Browserify is a tool to bundle Node.js-flavored CommonJS modules.

'use strict';

var someLibrary = {
  method: function() {}
};

module.exports = someLibrary;
'use strict';

var someLibrary = require('someLibrary');

// tyte!
someLibrary.method();

This is pretty awesome.

What do modules buy you?

  • Well-encapsulated units of code
  • No more global namespace pollution
  • No more brittle, weakly-stated dependencies

Why Browserify?

  • Super-simple syntax
  • Easy bundling
  • You can take advantage of npm (!)
  • Tons of plugins

Browserify

By Cameron Sampson

Browserify

  • 415