mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(bin) add --online, --offline
This commit is contained in:
parent
d1f967b851
commit
6146ac8710
3 changed files with 15 additions and 1 deletions
2
HELP.md
2
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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue