SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
1.
brows·er·if·y
Javascript module management for mere mortals
2.
My Application
jQuery
underscore
Application Code Library Code
3.
My Application
jQuery
underscore
Application Code Library Code
Linker
4.
My Application
jQuery
underscore
Application Code Library Code
global
variables
5.
Module management with
globals
Modules individually included on the page
Share a global namespace
Inclusion order must be manually calculated
6.
–browserify.org
“Browserify lets you
require('modules') in the browser
by bundling up all of your
dependencies.”
7.
Module management with
browserify
Modules are scoped in their own namespace
Uses CommonJS standard interface
Dependencies defined using require function
Modules are defined by assigning an object to
module.exports
Exactly like node.js
8.
var $ = require(‘jquery’);
$(‘body’).html(“Browserify saves the day”);
main.js
12.
Where to from here?
Detailed documentation: http://bit.ly/1kbozFB
grunt-browserify: wrapper for integration into Grunt
build with other tools, like uglify.
exorcist: extract source maps for browsers. Very useful,
terrible name.
watchify: CLI file watcher for performing automatic
builds during development.