fis-command-server
Advanced tools
Comparing version
{ | ||
"name" : "fis-command-server", | ||
"description" : "fis server command.", | ||
"version" : "0.2.7", | ||
"version" : "0.2.8", | ||
"author" : "FIS Team <fis@baidu.com>", | ||
@@ -6,0 +6,0 @@ "homepage" : "http://fis.baidu.com/", |
@@ -194,2 +194,3 @@ /* | ||
.action(function(cmd, options){ | ||
var conf = getConf(); | ||
switch (cmd){ | ||
@@ -237,3 +238,2 @@ case 'start': | ||
case 'info': | ||
var conf = getConf(); | ||
if(fis.util.isFile(conf)){ | ||
@@ -246,2 +246,11 @@ conf = fis.util.readJSON(conf); | ||
break; | ||
case 'open': | ||
if(fis.util.isFile(conf)){ | ||
conf = fis.util.readJSON(conf); | ||
if(fis.util.isDir(conf.root)){ | ||
var open = fis.util.isWin() ? 'start' : 'open'; | ||
require('child_process').exec(open + ' ' + fis.util.escapeShellArg(conf.root)); | ||
} | ||
} | ||
break; | ||
default : | ||
@@ -269,4 +278,8 @@ commander.help(); | ||
commander | ||
.command('open') | ||
.description('open document root directory'); | ||
commander | ||
.command('install <name>') | ||
.description('install server framework'); | ||
}; |
1865666
0.03%285
4.4%5
25%