From 0a6c35fa2ac69185376727a1bee17bf99d1ac418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=AD=A6=E9=9F=AC?= <346792184@qq.com> Date: Tue, 14 Jan 2020 21:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/build.js | 4 +++- index.js | 4 ++-- package.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) 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",