From 6146ac87103b8be5fe6b499e5b489e403240ae0b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 25 Mar 2015 03:53:10 -0400 Subject: [PATCH] feature(bin) add --online, --offline --- HELP.md | 2 ++ bin/cloudcmd.js | 12 +++++++++++- json/bin.json | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/HELP.md b/HELP.md index b6e4dc22..9c00cd80 100644 --- a/HELP.md +++ b/HELP.md @@ -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 diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index c8bae119..f717df90 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -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', diff --git a/json/bin.json b/json/bin.json index 2a93043c..5f5a05e2 100644 --- a/json/bin.json +++ b/json/bin.json @@ -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",