mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
refactor(CloudFunc) window.CloudFunc -> require
This commit is contained in:
parent
62899daa17
commit
ebe0183de0
8 changed files with 53 additions and 39 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* global CloudCmd, CloudFunc */
|
||||
/* global CloudCmd */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -6,6 +6,8 @@ const exec = require('execon');
|
|||
const currify = require('currify/legacy');
|
||||
|
||||
const load = require('../dom/load');
|
||||
|
||||
const {MAX_FILE_SIZE: maxSize} = require('../../common/cloudfunc');
|
||||
const {time, timeEnd} = require('../../common/util');
|
||||
|
||||
CloudCmd.Edit = EditProto;
|
||||
|
|
@ -97,8 +99,6 @@ function EditProto(callback) {
|
|||
|
||||
function _loadFiles(element, callback) {
|
||||
const socketPath = CloudCmd.PREFIX;
|
||||
const maxSize = CloudFunc.MAX_FILE_SIZE;
|
||||
|
||||
const prefix = socketPath + '/' + EditorName;
|
||||
const url = prefix + '/' + EditorName + '.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* global CloudCmd, DOM, CloudFunc */
|
||||
/* global CloudCmd, DOM */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -7,8 +7,11 @@ CloudCmd.Menu = MenuProto;
|
|||
const exec = require('execon');
|
||||
const currify = require('currify/legacy');
|
||||
|
||||
const {FS} = require('../../common/cloudfunc');
|
||||
|
||||
const load = require('../dom/load');
|
||||
const RESTful = require('../dom/rest');
|
||||
|
||||
const bind = (f, ...a) => (...b) => f(...a, ...b);
|
||||
|
||||
function MenuProto(position) {
|
||||
|
|
@ -261,7 +264,6 @@ function MenuProto(position) {
|
|||
function download(type) {
|
||||
const TIME = 30 * 1000;
|
||||
const prefixUr = CloudCmd.PREFIX_URL;
|
||||
const FS = CloudFunc.FS;
|
||||
const PACK = '/pack';
|
||||
const date = Date.now();
|
||||
const files = DOM.getActiveFiles();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
/* global CloudCmd, DOM, CloudFunc, $ */
|
||||
/* global CloudCmd, DOM, $ */
|
||||
|
||||
const itype = require('itype/legacy');
|
||||
const rendy = require('rendy');
|
||||
const exec = require('execon');
|
||||
|
||||
const {time} = require('../../common/util');
|
||||
const {FS} = require('../../common/cloudfunc');
|
||||
|
||||
const Files = require('../dom/files');
|
||||
const Events = require('../dom/events');
|
||||
const load = require('../dom/load');
|
||||
|
|
@ -95,7 +97,7 @@ function ViewProto(callback) {
|
|||
}
|
||||
|
||||
function show(data, options) {
|
||||
const prefixUrl = CloudCmd.PREFIX_URL + CloudFunc.FS;
|
||||
const prefixUrl = CloudCmd.PREFIX_URL + FS;
|
||||
|
||||
if (Loading)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue