Last active
March 5, 2018 03:12
-
-
Save andreruffert/b846c906861728a31f17 to your computer and use it in GitHub Desktop.
using `npm run` to build and watch with node-sass and browserify
This file contains hidden or 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
{ | |
"name": "my-app", | |
"version": "0.0.0", | |
"devDependencies": { | |
"browserify": "^10.2.4", | |
"watchify": "^3.2.3", | |
"node-sass": "^3.2.0", | |
"uglify": "^2.4.23", | |
"mkdirp": "^0.5.1", | |
"parallelshell": "^1.2.0", | |
"rimraf": "^2.4.1" | |
}, | |
"scripts": { | |
"build-sass": "mkdirp static/stylesheets && node-sass stylesheets/index.scss static/stylesheets/bundle.css", | |
"watch-sass": "mkdirp static/stylesheets && node-sass -wr stylesheets/*.scss' -o static/stylesheets/bundle.css -v", | |
"build-js": "mkdirp static/javascripts && browserify browser/*.js | uglifyjs -o static/javascripts/bundle.js", | |
"watch-js": "mkdirp static/javascripts && watchify browser/*.js -o static/javascripts/bundle.js -dv", | |
"build": "parallelshell 'npm run build-sass' 'npm run build-js'", | |
"watch": "parallelshell 'npm run watch-sass' 'npm run watch-js'", | |
"clean": "rimraf static", | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment