javascript - Can I run watchify and node-sass watch at the same time? -


i using npm scripts watchify , node-sass -w parameter.

can run these 2 'watch' commands @ same time? style.css compiled when scss changes, , bundle.js compiled when javascript source changes?

"scripts": {     "watch-js":"watchify dev/index.js -o dist/bundle.js",     "watch-css": "node-sass -w my-styles.scss style.css",     "thewatcher": "npm run watch-js & npm run watch-css" } 

yes, going happen. script "thewatcher" run "watch-js" , "watch-css" independently. watchify listen changes made dev/index.js , node-sass listen changes made my-styles.scss. if want know when new dist/bundle.js file has been written, modify "watch-js" script include -v flag:

"watch-js":"watchify dev/index.js -o dist/bundle.js -v" 

Comments