Created
July 27, 2012 13:03
-
-
Save deedubs/3187815 to your computer and use it in GitHub Desktop.
Browserify Middleware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var browserify = require('browserify') | |
, jade = require('jade') | |
, config = require(process.env.CONFIG) | |
, bundle = browserify({ | |
mount: '/app.js' | |
, require : { jquery: 'jquery-browserify', backbone: 'backbone-browserify' } | |
, watch: true | |
, debug: true | |
}); | |
bundle.addEntry(config.root + '/app/js/index.js'); | |
module.exports = function(app) { | |
app.use(bundle); | |
}; | |
module.exports.bundle = bundle; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment