Skip to content

Commit

Permalink
fix: easy dev env default value
Browse files Browse the repository at this point in the history
  • Loading branch information
sky committed Oct 11, 2018
1 parent c8d3204 commit cc9a7c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ program
.option('--server [port]', 'start http server')
.option('--speed', 'stat webpack build speed')
.description('webpack building')
.action((env, options) => {
.action((env = 'prod', options) => {
const config = utils.initWebpackConfig(program, { env, cliDevtool: options.devtool }, { speed: options.speed });
// 编译完成, 启动 HTTP Server 访问静态页面
if (options.server) {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports = {
},

initWebpackConfig(program, option = {}, cliConfig = {}) {
const { baseDir = process.cwd(), env = 'prod' } = option;
const { baseDir = process.cwd(), env } = option;
const { filename, port, framework, type, devtool, size, watch, build, hash, compress, dll, web, node, webpack } = program;
const target = web ? 'web' : (node ? 'node' : undefined);
const cli = merge({ env, filename, port, size, dll, web, node, webpack }, cliConfig);
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": "easywebpack-cli",
"version": "4.0.0",
"version": "4.0.1",
"description": "Webpack Building Command Line And Boilerplate Init Tool",
"bin": {
"easywebpack": "bin/cli.js",
Expand Down

0 comments on commit cc9a7c0

Please # to comment.