fix options

This commit is contained in:
Philipp Kunz 2016-08-19 11:16:13 +02:00
parent 2edcb3947e
commit 0be87e2f45
4 changed files with 11 additions and 4 deletions

2
dist/cli.js vendored Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env node
var index = require("./index.js");

View File

@ -23,6 +23,8 @@ exports.run = function (argvArg) {
defaultSettings: defaultConfig, defaultSettings: defaultConfig,
cwd: paths.cwd cwd: paths.cwd
}); });
// add argv
config.argv = argvArg;
// check mode // check mode
switch (config.mode) { switch (config.mode) {
case "default": case "default":
@ -31,7 +33,7 @@ exports.run = function (argvArg) {
done.resolve(config); done.resolve(config);
break; break;
default: default:
plugins.beautylog.error("mode " + config.mode + " not recognised!".red); plugins.beautylog.error("mode not recognised!");
process.exit(1); process.exit(1);
} }
; ;

View File

@ -47,12 +47,12 @@
"gulp-sourcemaps": "^1.6.0", "gulp-sourcemaps": "^1.6.0",
"gulp-typedoc": "^2.0.0", "gulp-typedoc": "^2.0.0",
"lodash": "^4.15.0", "lodash": "^4.15.0",
"npmextra": "^1.0.8", "npmextra": "^1.0.9",
"projectinfo": "1.0.3", "projectinfo": "1.0.3",
"q": "^1.4.1", "q": "^1.4.1",
"shelljs": "^0.7.3", "shelljs": "^0.7.3",
"smartcli": "1.0.4", "smartcli": "1.0.4",
"smartcov": "0.0.9", "smartcov": "1.0.0",
"smartenv": "1.2.5", "smartenv": "1.2.5",
"smartfile": "4.0.13", "smartfile": "4.0.13",
"smartpath": "3.2.2", "smartpath": "3.2.2",

View File

@ -40,6 +40,9 @@ export var run = function(argvArg){
cwd:paths.cwd cwd:paths.cwd
}); });
// add argv
config.argv = argvArg;
// check mode // check mode
switch (config.mode){ switch (config.mode){
case "default": case "default":
@ -48,7 +51,7 @@ export var run = function(argvArg){
done.resolve(config); done.resolve(config);
break; break;
default: default:
plugins.beautylog.error("mode " + config.mode + " not recognised!".red); plugins.beautylog.error(`mode not recognised!`);
process.exit(1); process.exit(1);
}; };