mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
refactor(cloudcmd) mv argv parsing to bin
This commit is contained in:
parent
c42c9f8be5
commit
e2a720425c
4 changed files with 24 additions and 16 deletions
|
|
@ -3,9 +3,22 @@
|
|||
(function(){
|
||||
'use strict';
|
||||
|
||||
var CloudCmd = require('../cloudcmd');
|
||||
var CloudCmd = require('../cloudcmd'),
|
||||
DIR = '../lib/',
|
||||
Util = require(DIR + 'util'),
|
||||
argv = process.argv,
|
||||
length = argv.length - 1,
|
||||
argvFirst = argv[length],
|
||||
isTest = Util.isContainStr(argvFirst, 'test');
|
||||
|
||||
CloudCmd.start();
|
||||
if (isTest) {
|
||||
Util.log('Cloud Commander testing mode');
|
||||
Util.log('argv: ', argv);
|
||||
}
|
||||
|
||||
CloudCmd.start({
|
||||
isTest: isTest
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue