Skip to content

Instantly share code, notes, and snippets.

@tomgp
Created May 28, 2017 18:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomgp/9bd791805a248cd6c03c52efbd601025 to your computer and use it in GitHub Desktop.
Save tomgp/9bd791805a248cd6c03c52efbd601025 to your computer and use it in GitHub Desktop.
simple npm script based build for js projects
{
"name": "starter",
"version": "0.0.1",
"main": "index.js",
"license": "MIT",
"dependencies": {
"browser-sync": "^2.18.12",
"nodemon": "^1.11.0",
"webpack": "^2.6.1"
},
"scripts": {
"serve": "./node_modules/.bin/browser-sync start --files 'dist' 'index.html' --server ",
"build": "./node_modules/.bin/webpack app/index.js dist/bundle.js",
"build:watch": "./node_modules/.bin/nodemon --exec \"npm run build\" --watch ./app",
"start": "npm run build:watch | npm run serve"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment