Quick question, when I run browserify index.js -o app.js from mac terminal, I get command not found. I have done npm install -g browserify but still no luck. Any idea why I am getting this?
Thank you
It was easier for me to do a gist than to paste here: https://gist.github.com/pertrai1/4ccf77e7b31cb5628b5d
Browserify is an open-source JavaScript bundler tool that allows developers to write and use Node. js-style modules that compile for use in the browser.
Browserify allows us to use Node-style modules in the browser. Normally when we want to include some library code in our project, we include another script tag on the page.
Browserify solves the problems of having too many JS files referenced in your HTML, inability to use Node modules in the browser, and inability to reference your own modules in your own code. Watchify streamlines the process of bundling your files and will make a change every time you change a JS file in your project.
Just install it in a global space like this if you need to run it from the command line.
npm install browserify -g
You may need to run
npm uninstall browserify -g
fist just to be sure you don't have false aliases.
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