Browserify
substack/browserify-handbook
substack/browserify-handbook (builtins)

Cross platform JavaScript with Browserify - Sharing Code Between Node.js and the Browser - codecentric Blog : codecentric Blog

$ browserify -r ./lib/slugger:slugger > static/bundle.js
# export `require()` in browser and the module 'slugger'

browserify for webpack users

internals

How Browserify Works
Introduction to Browserify • Blake Embrey
substack/browserify-handbook (how browserify works)
substack/browserify-handbook (bundling)

option passing

substack/node-browserify browser-field in pacakge.json
substack/browserify-handbook (package.json)

CLI

browserify -t [ foo -v --bar=555 ] main.js

API

b.transform('foo', { v: true, bar: 555 })

package.json

"browserify": {
  "transform": [
    [
      "foo",
      {
        v: true
        "bar": 555
      }
    ]
  ]
},

transforms

list of transforms · substack/node-browserify Wiki
substack/browserify-handbook (transforms)
npm browserify-transform

substack/node-browserify

plugins

npm browserify-plugin

substack/node-browserify (plugins)
substack/browserify-handbook (plugins)

css-modules/css-modulesify
css-modules/browserify-demo

tools

browserify tools · substack/node-browserify Wiki
npm browserify-tool

ecosystem

substack/schoolbus
substack/yarnify
substack/webworkify

Livereload

chrisdickinson/beefy
milankinen/livereactload

AgentME/browserify-hmr
substack/react-starter-hmr

browserify-shim

Use thlorenz/browserify-shim to wrap non-CommonJS library to make them require()-able

mattdesl/shimbro
substack/browserify-handbook (browserify-shim)

browserify shim recipes · thlorenz/browserify-shim Wiki

// configure bundle files
"browser": {
"jquery": "./js/vendor/jquery.js"
},
// configure require-mapping
"browserify-shim": {
"jquery": "$"
"three": "global:THREE"
}

jQuery will be bundled in bundle.js; and you are supposed to include three.js in HTML.

BROWSERIFYSHIM_DIAGNOSTICS=1 browserify -d . -o js/bundle.js

bower

taptapship/wiredep

testing

how I write tests for node and the browser

substack/testling
Test in headless browser:

$ browserify test/beep.js | testling

https://ci.testling.com

substack/coverify

$ browserify -t coverify test/*.js | node | coverify

substack/covert

Comments