Last active
July 28, 2016 10:49
-
-
Save leo/1159217762212048cbc76c9067ee1699 to your computer and use it in GitHub Desktop.
Using npm as a build tool (bad)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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
https://medium.com/@leo/should-npm-really-be-used-as-a-built-tool-e8ff4f6cbcef#.melvf67zm