substack/factor-bundle — pull request #28 by jgoz (2014-08-16 21:50:56+00:00)
Title: API enhancements

This improves the plugin API use case for factor-bundle.

- Re-hook into the pipeline on `reset` — necessary when calling `bundle()` multiple times, e.g., with the watchify API
- Attach `factored` method to browserify instance — creates/returns a `through` stream through which all factored bundle streams will pass. *Definitely open to suggestions on suitability, naming, etc.*
- Add `opts.outputs` alias for `opts.o` to mirror `opts.entries`
- In addition to strings & streams, accept functions that return strings/streams in `opts.o`. Especially when streaming, this is necessary to recreate streams for multiple `bundle()` calls. Works nicely with [lazypipe](https://npmjs.org/package/lazypipe).
- Added documentation around plugin usage with browserify API. The example uses gulp, but I'd be happy to change that.