feature(package) putout v4.0.0

This commit is contained in:
coderaiser 2019-02-16 21:12:32 +02:00
parent f20c7b15a4
commit d6674aed3e
6 changed files with 8 additions and 11 deletions

View file

@ -10,9 +10,6 @@
"client/(client|cloudcmd|load-module).js": {
"remove-console": false
},
"bin": {
"remove-console": false
},
"test/common/cloudfunc.js": {
"remove-console": false
},

View file

@ -459,7 +459,7 @@ function CloudCmdProto(DOM) {
current = DOM.getCurrentByName(dir);
if (!current)
current = DOM.getFiles(panel)[0];
[current] = DOM.getFiles(panel);
DOM.setCurrentFile(current, {
history,
@ -528,7 +528,7 @@ function CloudCmdProto(DOM) {
CloudCmd.loadDir({path}, () => {
const {panel} = Info;
const current = DOM.getCurrentByName(dir);
const first = DOM.getFiles(panel)[0];
const [first] = DOM.getFiles(panel);
DOM.setCurrentFile(current || first, {
history,

View file

@ -57,7 +57,7 @@ module.exports.getCurrentName = (currentFile) => {
if (!current)
return '';
const link = DOM.getCurrentLink(current);
if (!link)
@ -83,7 +83,7 @@ module.exports.getCurrentDirPath = (panel = DOM.getPanel()) => {
*/
module.exports.getCurrentPath = (currentFile) => {
const current = currentFile || DOM.getCurrentFile();
const element = DOM.getByTag('a', current)[0];
const [element] = DOM.getByTag('a', current);
const {prefix} = CloudCmd;
const path = element

View file

@ -844,7 +844,7 @@ function CmdProto() {
current = DOM.getCurrentByName(name, panel);
if (!current)
current = filesPassive[0];
[current] = filesPassive;
}
DOM.setCurrentFile(current, {

View file

@ -314,7 +314,7 @@ function _processFiles(options, data) {
if (!names.length)
names.push(DOM.getCurrentName());
const name = names[0];
const [name] = names;
const sameName = DOM.getCurrentByName(name, panel);
@ -444,7 +444,7 @@ function twopack(operation, type) {
function message(msg, to, names) {
const n = names.length;
const name = names[0];
const [name] = names;
msg += ' ';

View file

@ -182,7 +182,7 @@
"optimize-css-assets-webpack-plugin": "^5.0.0",
"philip": "^2.0.0",
"place": "^1.1.4",
"putout": "^3.0.0",
"putout": "^4.0.0",
"readjson": "^1.1.3",
"request": "^2.76.0",
"rimraf": "^2.5.4",