Browserify Recipes

3029 days ago, 0 views.

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()
Kiko Beats

Kiko Beats