mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
chore(cloudcmd) es2018-ify
This commit is contained in:
parent
d3b965ec38
commit
a232da999d
9 changed files with 31 additions and 27 deletions
|
|
@ -5,7 +5,7 @@
|
|||
const Info = require('../package');
|
||||
const DIR_SERVER = '../server/';
|
||||
|
||||
const promisify = require('es6-promisify').promisify;
|
||||
const {promisify} = require('util');
|
||||
const wraptile = require('wraptile');
|
||||
|
||||
const exit = require(DIR_SERVER + 'exit');
|
||||
|
|
@ -241,9 +241,7 @@ function readConfig(name) {
|
|||
mode: 'json'
|
||||
});
|
||||
|
||||
const result = tryCatch(readjsonSync, name);
|
||||
const error = result[0];
|
||||
const data = result[1];
|
||||
const [error, data] = tryCatch(readjsonSync, name);
|
||||
|
||||
if (error)
|
||||
return exit(error.message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue