mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(package) eslint v4.0.0
This commit is contained in:
parent
ca5a614a55
commit
71d366a6a1
11 changed files with 51 additions and 47 deletions
|
|
@ -13,13 +13,13 @@ const setDir = (name) => {
|
|||
};
|
||||
|
||||
fs.readdirSync(dir)
|
||||
.map(fillFile)
|
||||
.map(writeFile);
|
||||
.map(fillFile)
|
||||
.map(writeFile);
|
||||
|
||||
function fillFile(name) {
|
||||
return {
|
||||
name: setDir(name),
|
||||
data: `module.exports = require(\'../../server_/${name}\');`
|
||||
data: `module.exports = require('../../server_/${name}');`
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ function BufferProto() {
|
|||
|
||||
function clear() {
|
||||
Storage.remove(COPY)
|
||||
.remove(CUT);
|
||||
.remove(CUT);
|
||||
|
||||
rmCutClass();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ function CmdProto() {
|
|||
return DOM;
|
||||
};
|
||||
|
||||
/*
|
||||
/*
|
||||
* set current file by position
|
||||
*
|
||||
* @param layer - element
|
||||
|
|
@ -655,7 +655,7 @@ function CmdProto() {
|
|||
return ret;
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* get link from current (or param) file
|
||||
*
|
||||
* @param currentFile - current file by default
|
||||
|
|
@ -970,7 +970,7 @@ function CmdProto() {
|
|||
return currentNew;
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* remove selected files from file table
|
||||
* @Selected
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ function load(params) {
|
|||
|
||||
if (/^(script|link)$/.test(name))
|
||||
Events.addOnce('load', element, funcLoad)
|
||||
.addError(element, funcError);
|
||||
.addError(element, funcError);
|
||||
|
||||
if (id)
|
||||
element.id = id;
|
||||
|
|
|
|||
|
|
@ -29,25 +29,29 @@ function RESTful() {
|
|||
});
|
||||
};
|
||||
|
||||
this.patch = function(url, data, callback) {
|
||||
var isFunc = itype.function(data);
|
||||
this.patch = (url, data, callback) => {
|
||||
const isFunc = itype.function(data);
|
||||
|
||||
if (!callback && isFunc) {
|
||||
callback = data;
|
||||
data = null;
|
||||
}
|
||||
|
||||
const imgPosition = {
|
||||
top: true
|
||||
};
|
||||
|
||||
sendRequest({
|
||||
method : 'PATCH',
|
||||
url : FS + url,
|
||||
data : data,
|
||||
callback : callback,
|
||||
imgPosition : { top: true }
|
||||
method: 'PATCH',
|
||||
url: FS + url,
|
||||
data,
|
||||
callback,
|
||||
imgPosition,
|
||||
});
|
||||
};
|
||||
|
||||
this.write = function(url, data, callback) {
|
||||
var isFunc = itype.function(data);
|
||||
this.write = (url, data, callback) => {
|
||||
const isFunc = itype.function(data);
|
||||
|
||||
if (!callback && isFunc) {
|
||||
callback = data;
|
||||
|
|
@ -55,20 +59,20 @@ function RESTful() {
|
|||
}
|
||||
|
||||
sendRequest({
|
||||
method : 'PUT',
|
||||
url : FS + url,
|
||||
data : data,
|
||||
callback : callback,
|
||||
method: 'PUT',
|
||||
url: FS + url,
|
||||
data,
|
||||
callback,
|
||||
imgPosition : { top: true }
|
||||
});
|
||||
};
|
||||
|
||||
this.read = function(url, dataType, callback) {
|
||||
var isQuery = /\?/.test(url);
|
||||
var isBeautify = /\?beautify$/.test(url);
|
||||
var isMinify = /\?minify$/.test(url);
|
||||
var notLog = !isQuery || isBeautify || isMinify;
|
||||
var isFunc = itype.function(dataType);
|
||||
this.read = (url, dataType, callback) => {
|
||||
const isQuery = /\?/.test(url);
|
||||
const isBeautify = /\?beautify$/.test(url);
|
||||
const isMinify = /\?minify$/.test(url);
|
||||
const notLog = !isQuery || isBeautify || isMinify;
|
||||
const isFunc = itype.function(dataType);
|
||||
|
||||
if (!callback && isFunc) {
|
||||
callback = dataType;
|
||||
|
|
@ -78,28 +82,28 @@ function RESTful() {
|
|||
sendRequest({
|
||||
method: 'GET',
|
||||
url: FS + url,
|
||||
callback: callback,
|
||||
notLog: notLog,
|
||||
dataType: dataType
|
||||
callback,
|
||||
notLog,
|
||||
dataType,
|
||||
});
|
||||
};
|
||||
|
||||
this.cp = function(data, callback) {
|
||||
this.cp = (data, callback) => {
|
||||
sendRequest({
|
||||
method : 'PUT',
|
||||
url : '/cp',
|
||||
data : data,
|
||||
callback : callback,
|
||||
method: 'PUT',
|
||||
url: '/cp',
|
||||
data,
|
||||
callback,
|
||||
imgPosition : { top: true }
|
||||
});
|
||||
};
|
||||
|
||||
this.pack = function(data, callback) {
|
||||
this.pack = (data, callback) => {
|
||||
sendRequest({
|
||||
method : 'PUT',
|
||||
url : '/pack',
|
||||
data : data,
|
||||
callback : callback
|
||||
data,
|
||||
callback,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ function KeyProto() {
|
|||
};
|
||||
|
||||
function getChar(event) {
|
||||
/*
|
||||
/*
|
||||
* event.keyIdentifier deprecated in chrome v51
|
||||
* but event.key is absent in chrome <= v51
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ function onTouch(event) {
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* download file from browser to desktop
|
||||
* in Chrome (HTML5)
|
||||
*/
|
||||
|
|
@ -445,7 +445,7 @@ function dragndrop() {
|
|||
|
||||
[...panels].forEach((panel) => {
|
||||
Events.add('dragover', panel, onDragOver)
|
||||
.add('drop', panel, onDrop);
|
||||
.add('drop', panel, onDrop);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ function MenuProto(position) {
|
|||
files.forEach((file) => {
|
||||
const selected = DOM.isSelected(file);
|
||||
const isDir = DOM.isCurrentIsDir(file);
|
||||
/*
|
||||
/*
|
||||
* if we send ajax request -
|
||||
* no need in hash so we escape #
|
||||
* and all other characters, like "%"
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ function OperationProto(operation, data) {
|
|||
twopack('extract');
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* prompt and delete current file or selected files
|
||||
*
|
||||
* @currentFile
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
"emitify": "^3.0.2",
|
||||
"es6-promise": "^4.0.5",
|
||||
"es6-promisify": "^5.0.0",
|
||||
"eslint": "^3.1.1",
|
||||
"eslint": "^4.0.0",
|
||||
"gunzip-maybe": "^1.3.1",
|
||||
"html-looks-like": "^1.0.2",
|
||||
"jscs": "^3.0.1",
|
||||
|
|
|
|||
|
|
@ -85,15 +85,15 @@ function indexProcessing(options) {
|
|||
|
||||
if (noConfig)
|
||||
data = data
|
||||
.replace('icon-config', 'icon-config none');
|
||||
.replace('icon-config', 'icon-config none');
|
||||
|
||||
if (noConsole)
|
||||
data = data
|
||||
.replace('icon-console', 'icon-console none');
|
||||
.replace('icon-console', 'icon-console none');
|
||||
|
||||
if (noTerminal)
|
||||
data = data
|
||||
.replace('icon-terminal', 'icon-terminal none');
|
||||
.replace('icon-terminal', 'icon-terminal none');
|
||||
|
||||
let left = rendy(Template.panel, {
|
||||
side : 'left',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue