feature(bin) add --online, --offline

This commit is contained in:
coderaiser 2015-03-25 03:53:10 -04:00
parent d1f967b851
commit 6146ac8710
3 changed files with 15 additions and 1 deletions

View file

@ -61,6 +61,8 @@ Cloud Commander supports command line parameters:
| `-h, --help` | display help and exit
| `-v, --version` | output version information and exit
| `-s, --save` | save options
| `-on, --online` | load scripts from remote servers
| `-off, --offline` | load scripts from local server
| `-a, --auth` | enable authorization
| `-na, --no-auth` | disable authorization
| `-p, --port` | set port number

View file

@ -17,12 +17,22 @@
argv = process.argv,
args = require('minimist')(argv.slice(2), {
string: ['port', 'password', 'username', 'auth', 'no-auth'],
string: [
'port',
'password',
'username',
'auth',
'no-auth',
'online',
'offline'
],
boolean: ['test', 'repl', 'save'],
alias: {
v: 'version',
h: 'help',
p: 'port',
on: 'online',
off: 'offline',
u: 'username',
ps: 'password',
s: 'save',

View file

@ -2,6 +2,8 @@
"-h, --help " : "display this help and exit",
"-v, --version " : "output version information and exit",
"-s, --save " : "save options",
"-on, --online " : "load scripts from remote servers",
"-off, --offline" : "load scripts from local server",
"-a, --auth " : "enable authorization",
"-na, --no-auth " : "disable authorization",
"-p, --port " : "set port number",