Using Browserify in a REPL
I have found a way to use Browserify in a REPL. You will need a Bash REPL for this.
First, install Browserify, along with your dependencies:
Then, if you didn't already, run this to make
Then, add this entry under scripts in your
It would look like this:
You can change the index.js to whatever file you want to browserify, as well as bundle.js.
Now make your index.js file if you haven't already, and this is what mine looks like:
Then, when you want, browserify it by using
npm run bundle.
A new file will be created, and you can use it in your index.html file.
You can either make an HTML REPL and copy the code from your Bash REPL, or you can use Express to run it in the same REPL.