Skip to content

Commit ed83dfc

Browse files
committed
Rename npm script
webpack scripts are meant to “build” assets, so place them under the same namespace * dev => build:dev * build => build:prod
1 parent 65a1a62 commit ed83dfc

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Get started
5353
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.
5454
3. Setup the configs, see more below
5555
4. Setup environment variables which will overwrite the configs
56-
5. Build front-end bundle by `npm run build` (use `npm run dev` if you are in development)
56+
5. Build front-end bundle by `npm run build:prod` (use `npm run build:dev` if you are in development)
5757
6. Run the server as you like (node, forever, pm2)
5858

5959
Upgrade guide

bin/heroku

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ EOF
3131
cp public/js/config.js.example public/js/config.js
3232

3333
# build app
34-
npm run build
34+
npm run build:prod
3535
fi

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "app.js",
66
"license": "MIT",
77
"scripts": {
8-
"build": "webpack --config webpack.production.js --progress --colors",
9-
"dev": "webpack --config webpack.config.js --progress --colors --watch",
8+
"build:dev": "webpack --config webpack.config.js --progress --colors --watch",
9+
"build:prod": "webpack --config webpack.production.js --progress --colors",
1010
"assets:install": "bower install",
1111
"postinstall": "bin/heroku",
1212
"start": "node app.js"

0 commit comments

Comments
 (0)