browserify v2 middleware for express
Basically just brings back the features that were originally in browserify v1
This is how you use it in an Express project.
var browserify_express = require'browserify-express';var bundle = browserify_expressentry: __dirname + '/app/js/entry.js'watch: __dirname + '/app/js/'mount: '/js/myapp.js'verbose: trueminify: truebundle_opts: debug: true // enable inline sourcemap on js fileswrite_file: __dirname + '/public/js/myapp.js'ignore: 'optional.js' // optional array of files to ignore;appusebundle;
In this example:
watch, this can also just watch a single file.
This is supported by default however all your require()'s must include the .coffee extensions, it will not pick it up by default.