From ed83dfc862768572eab0c2aed629b1700ac9e224 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 10 Dec 2016 22:12:07 +0800 Subject: [PATCH] Rename npm script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit webpack scripts are meant to “build” assets, so place them under the same namespace * dev => build:dev * build => build:prod --- README.md | 2 +- bin/heroku | 2 +- package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 80efdf7..78ff638 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Get started 2. Enter the directory and type `bin/setup`, which will install npm/bower dependencies and create configs. The setup script is written in Bash, you would need bash as a prerequisite. 3. Setup the configs, see more below 4. Setup environment variables which will overwrite the configs -5. Build front-end bundle by `npm run build` (use `npm run dev` if you are in development) +5. Build front-end bundle by `npm run build:prod` (use `npm run build:dev` if you are in development) 6. Run the server as you like (node, forever, pm2) Upgrade guide diff --git a/bin/heroku b/bin/heroku index 12f9cc1..9c06c27 100755 --- a/bin/heroku +++ b/bin/heroku @@ -31,5 +31,5 @@ EOF cp public/js/config.js.example public/js/config.js # build app - npm run build + npm run build:prod fi diff --git a/package.json b/package.json index eab454a..4c7cbb1 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "app.js", "license": "MIT", "scripts": { - "build": "webpack --config webpack.production.js --progress --colors", - "dev": "webpack --config webpack.config.js --progress --colors --watch", + "build:dev": "webpack --config webpack.config.js --progress --colors --watch", + "build:prod": "webpack --config webpack.production.js --progress --colors", "assets:install": "bower install", "postinstall": "bin/heroku", "start": "node app.js"