Skip to content

Instantly share code, notes, and snippets.

@stephan83
Created April 8, 2012 17:20
Show Gist options
  • Save stephan83/2338601 to your computer and use it in GitHub Desktop.
Save stephan83/2338601 to your computer and use it in GitHub Desktop.
Browserify templates
browserify = require 'browserify'
eco = require 'eco'
bundle = browserify {
mount: '/javascripts/bootstrap.js'
}
bundle.register '.eco', (body) ->
"module.exports = #{eco.precompile body};"
bundle.addEntry path.join(__dirname, './lib/bootstrap.coffee')
app.use bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment