substack/factor-bundle — pull request #25 by terinjokes (2014-08-12 05:44:30+00:00)
Title: Support piping factored bundles to a stream.

If using factor-bundle as a Browserify plugin via the API, support
piping the factored bundles to a stream, in addition to the current
write-to-fs approach.

This allows factor-bundle to more easily utilized within streaming
environments.

```javascript
var level = require('level');
var Store = require('level-store');
var browserify = require('browserify');
var factor = require('factor-bundle');

var store = Store(Level('/tmp/bundles'));

var b = browserify(['./entries/a.js', './entries/b.js']);
b.plugin(factor({
o: [ store.createWriteStream('a'), store.createWriteStream('b') ]
}));
b.bundle().pipe(store.createWriteStream('common'));
```

While I'm not sure of the practicality of this example, it seemed like
a fun little thing to write.