diff --git a/bin/build.js b/bin/build.js index 8500023..b5806ed 100644 --- a/bin/build.js +++ b/bin/build.js @@ -25,7 +25,9 @@ function build (options) { }) } else { compiler.run((err, stats) => { - console.log(err) + if (err) { + console.log(err) + } }) } } diff --git a/index.js b/index.js index 02e05b0..fd512ee 100644 --- a/index.js +++ b/index.js @@ -6,14 +6,14 @@ global._G = { config: packageConfig } -var args = process.argv +var args = process.argv.slice(2) var argEnv = args[0] var argPackage = args.filter((e) => { return packages.indexOf(e) >= 0 }) if (argPackage.length > 0) { - _G.env = argEnv[0] + _G.env = argEnv _G.packages = argPackage require('./bin/index')() } else { diff --git a/package.json b/package.json index ecfaacf..9ca4154 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dividing", - "version": "2.0.4", + "version": "2.0.5", "description": "a tool for multi-page project", "keywords": [ "splitter",