mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor(cloudcmd) emitify, exec: make global to prevent additonal loading of extensions
This commit is contained in:
parent
8bc07ca700
commit
5a989cd62f
3 changed files with 7 additions and 12 deletions
|
|
@ -1,5 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
// prevent additional loading of exec by spero, remedy, ishtar, salam, omnes
|
||||
window.exec = require('execon');
|
||||
|
||||
// prevent additional loading of emitify
|
||||
window.Emitify = require('emitify');
|
||||
|
||||
window.CloudCmd = (config) => {
|
||||
window.Util = require('../common/util');
|
||||
window.CloudFunc = require('../common/cloudfunc');
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function uploadDirectory(items) {
|
|||
return item.webkitGetAsEntry();
|
||||
});
|
||||
|
||||
array = array.map(function(name) {
|
||||
array = array.map((name) => {
|
||||
const result = [
|
||||
'/modules/' + name,
|
||||
'/lib/' + name,
|
||||
|
|
@ -34,12 +34,6 @@ function uploadDirectory(items) {
|
|||
return result;
|
||||
});
|
||||
|
||||
if (!window.Emitify)
|
||||
window.Emitify = require('emitify');
|
||||
|
||||
if (!window.exec)
|
||||
window.exec = require('execon');
|
||||
|
||||
const url = CloudCmd.join(array);
|
||||
|
||||
load.js(url, () => {
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@ const currify = require('currify/legacy');
|
|||
const exec = require('execon');
|
||||
const emitify = require('emitify');
|
||||
|
||||
// prevent loading of exec by spero, remedy, ishtar, salam, omnes
|
||||
window.exec = exec;
|
||||
// prevent loading of emitify
|
||||
window.Emitify = emitify;
|
||||
|
||||
const RESTful = require('./rest');
|
||||
|
||||
function OperationProto(operation, data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue