Skip to content

Commit

Permalink
修复环境问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Taoja committed Jan 14, 2020
1 parent e91107e commit 0a6c35f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ function build (options) {
})
} else {
compiler.run((err, stats) => {
console.log(err)
if (err) {
console.log(err)
}
})
}
}
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dividing",
"version": "2.0.4",
"version": "2.0.5",
"description": "a tool for multi-page project",
"keywords": [
"splitter",
Expand Down

0 comments on commit 0a6c35f

Please sign in to comment.