tomgp
5/28/2017 - 6:21 PM

simple npm script based build for js projects

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"
  }
}