Skip to content

Instantly share code, notes, and snippets.

@phivk
Created July 20, 2017 14:48
Show Gist options
  • Save phivk/521926787e2a5a622560cc6658a67010 to your computer and use it in GitHub Desktop.
Save phivk/521926787e2a5a622560cc6658a67010 to your computer and use it in GitHub Desktop.
boilerplate package.json for npm script based workflow
{
"name": "npm-scripts-boilerplate",
"version": "1.0.0",
"description": "npm scripts based workflow including scss & livereload",
"dependencies": {
"lodash": "^4.17.4"
},
"devDependencies": {
"browserify": "latest",
"livereload": "latest",
"node-sass": "latest",
"parallelshell": "latest",
"watch": "latest"
},
"scripts": {
"browser-sync": "browser-sync start --server dist/ --files dist/",
"build:js": "browserify assets/scripts/main.js > dist/js/main.js",
"watch:js": "watch 'npm run build:js' assets/scripts/",
"build:scss": "node-sass assets/styles/style.scss dist/css/style.css",
"watch:scss": "watch 'npm run build:scss' assets/styles/",
"build": "npm run build:js && npm run build:scss",
"dev": "parallelshell 'npm run watch:js' 'npm run watch:scss' 'npm run browser-sync'"
},
"author": "phivk",
"license": "ISC"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment