Whenever I change function.js, I have to manually run the command below to browserify function.js into a bundle.js
$ browserify function.js --standalone function > bundle.js
How can this step be automated such that the command is run automatically in the background whenever function.js is modified?
I am using node.js v6.9 with Webstorm 2016.2 on Windows 10.
This is very easy with watchify, Just install
npm i -D watchify
then update your 'package.json' file with a command "watch" : "npx watchify <source>.js -o <output>.js"
And your are ready to go with just running your npm command npm run watch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With