Skip to content

Instantly share code, notes, and snippets.

@leo
Last active July 28, 2016 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leo/1159217762212048cbc76c9067ee1699 to your computer and use it in GitHub Desktop.
Save leo/1159217762212048cbc76c9067ee1699 to your computer and use it in GitHub Desktop.
Using npm as a build tool (bad)
"scripts": {
"install": "npm run build",
"start": "parallelshell 'livereload dist' 'nodemon index -w views/ -e hbs,js -i assets/'",
"build:js": "rollup assets/js/app.js > dist/app.js",
"build:scss": "node-sass assets/scss -o dist --output-style compressed",
"build:images": "cp -r assets/images/* dist/images",
"prebuild": "rm -rf dist && mkdir dist && mkdir dist/images",
"build": "npm run build:js && npm run build:scss && npm run build:images",
"watch:js": "watch 'npm run build:js' assets/js",
"watch:scss": "watch 'npm run build:scss' assets/scss",
"watch:images": "watch 'npm run build:images' assets/images",
"watch": "parallelshell 'npm run watch:js' 'npm run watch:scss' 'npm run watch:images'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment