~ read.
Browserify Recipes

Browserify Recipes

Creating require module in the browser

var browserify = require('browserify')

browserify()  
  .require(src.main, {expose: module.shortcut})
  .bundle()

Creating global module in the browser

var browserify = require('browserify')  
browserify(src.vanilla, {standalone: module.shortcut})  
  .bundle()

Applying transpilers (like CoffeeScript, TypeScript, Babel,...)

var browserify = require('browserify')  
var coffeeify = require('coffeeify')

browserify extensions: ['.coffee', '.js']  
  .transform coffeeify, global: true
  .require(src.main, { expose: module.shortcut})
  .ignore('coffee-script')
  .bundle()