browserify-global
v1.1.2
Published
Let you use node global vars with browserify bundled file via node
Downloads
45
Readme
example
main.js:
console.log(__dirname);
console.log(__filename);
now you can bundle like this:
var browserify = require('browserify');
var b = browserify('main.js', {
plugin: ['browserify-global']
});
b.bundle().pipe(process.stdout);
or like this:
browserify -p browserify-global main.js