substack/insert-module-globals — pull request #5 by amiuhle (2013-04-22 17:41:40+00:00)
Title: Globals

Option to add provide custom global `process` and `Buffer` implementations, currently only via `grunt-browserify`:

```javascript
browserify: {
bundle: {
src: [],
require: ['mongodb', 'tcp_wrap-chromeify'],
dest: 'app/scripts/vendor/bundle.js',
ignore: 'node_modules/browser-resolve/node_modules/buffer-browserify/index.js',
options: {
globals: {
process: 'browser-resolve/builtin/process',
Buffer: 'buffer-browserify'
}
}
}
}
```

Needs substack/node-browserify#386

Working implementation here:
https://github.com/amiuhle/chrome-mongo-admin