Skip to content

Instantly share code, notes, and snippets.

@dominictarr
Last active December 14, 2015 04:28
Show Gist options
  • Save dominictarr/5028051 to your computer and use it in GitHub Desktop.
Save dominictarr/5028051 to your computer and use it in GitHub Desktop.
var browserify = require('./');
var through = require('through');
var stream = through(function(data) {
var self = this;
self.resume();
self.emit('data', data);
});
var bundle = browserify();
bundle.require(__dirname + '/foo.js');
bundle.bundle().pipe(stream).pipe(process.stdout);
process.stdout.emit('drain')
process.nextTick();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment