mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(cloudcmd) add editor
This commit is contained in:
parent
c4b8ca79f2
commit
0caf78841d
3 changed files with 12 additions and 0 deletions
1
HELP.md
1
HELP.md
|
|
@ -65,6 +65,7 @@ Cloud Commander supports command line parameters:
|
|||
| `-u, --username` | set username
|
||||
| `-p, --password` | set password
|
||||
| `-c, --config` | configuration file path
|
||||
| `--editor` | set editor: "dword" or "edward"
|
||||
| `--root` | set root directory
|
||||
| `--port` | set port number
|
||||
| `--no-auth` | disable authorization
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
'password',
|
||||
'username',
|
||||
'config',
|
||||
'editor',
|
||||
'root'
|
||||
],
|
||||
boolean: [
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
port : config('port'),
|
||||
minify : config('minify'),
|
||||
online : config('online'),
|
||||
editor : config('editor'),
|
||||
username : config('username'),
|
||||
},
|
||||
alias: {
|
||||
|
|
@ -70,6 +72,7 @@
|
|||
config('minify', args.minify);
|
||||
config('username', args.username);
|
||||
root(args.root);
|
||||
editor(args.editor);
|
||||
|
||||
readConfig(args.config);
|
||||
|
||||
|
|
@ -165,6 +168,13 @@
|
|||
|
||||
}
|
||||
|
||||
function editor(name) {
|
||||
var reg = /^(dword|edward)$/;
|
||||
|
||||
if (!reg.test(name))
|
||||
exit('cloudcmd --editor: could be "dword" or "edward" only');
|
||||
}
|
||||
|
||||
function repl() {
|
||||
console.log('REPL mode enabled (telnet localhost 1337)');
|
||||
require(DIR_LIB + '/server/repl');
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
"-u, --username " : "set username",
|
||||
"-p, --password " : "set password",
|
||||
"-c, --config " : "configuration file path",
|
||||
"--editor " : "set editor: \"dword\" or \"edward\"",
|
||||
"--root " : "set root directory",
|
||||
"--port " : "set port number",
|
||||
"--no-auth " : "disable authorization",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue