browserify / factor-bundle

factor browser-pack bundles into common shared bundles
Other
402 stars 27 forks source link

Outputs as function, and reconstruct each addHooks #75

Closed dgbeck closed 9 years ago

dgbeck commented 9 years ago

This is a combination of #71 and the idea of allowing outputs to be a function (as seen in https://github.com/Aben/factor-bundle/commit/18692d69d983470857d6d3c6af7b7bd12266714f, with a signature change), to fix #63 so that factor-bundle can work with watchify.

71 fixes the issue for string outputs but not for stream outputs. In order to fix it for stream outputs, we need to be able to specify a function for outputs that creates new streams each time .bundle is called on the browserify instance. That is, unless you have a better idea, @substack

Includes tests from #71 and an additional test for output option as a function.

If the outputs option is specified as a function, the function should take no arguments and return a valid (non-function) value for the outputs option. e.g. an array of strings. Simple.

All tests passing, version bumped to 2.5.0.

ghost commented 9 years ago

it's better not to bump the version in a pull request, since that makes things harder to combine with other patches

ghost commented 9 years ago

merged as 2.5.0