wzq
Version:
微证券开发工具,集成ssi-server、构建等功能
48 lines (38 loc) • 1.07 kB
JavaScript
// 依赖
var commander = require('commander')
var serve = require('../server/');
commander
.command('trunk')
.option('-d, --dir <dir>', '工作目录')
.option('-p, --port <port>', '监听端口', 3000)
.action(function (args) {
serve({
path: args && args.dir || 'F://finance_web_proj/trunk/wzq/htdocs',
port: args && args.port
});
});
commander
.command('dev')
.option('-d, --dir <dir>', '工作目录')
.option('-p, --port <port>', '监听端口', 3000)
.action(function (args) {
serve({
path: args && args.dir || 'F://finance_web_proj/branches/dev/wzq/htdocs',
port: args && args.port
});
});
commander
.command('hk')
.option('-d, --dir <dir>', '工作目录')
.option('-p, --port <port>', '监听端口', 3000)
.action(function (args) {
serve({
path: args && args.dir || 'F://finance_web_proj/branches/dev/wzq/htdocs',
port: args && args.port
});
});
if (process.argv.slice(2).length === 0) {
commander.help();
}
commander.parse(process.argv);