Uh oh!
There was an error while loading. Please reload this page.
Optionally use user-provided output streams - #65
Conversation
joeybaker
commented
May 29, 2015
@eggyal cool! |
joeybaker
commented
May 29, 2015
Can you rebase on master (so this can be merged) and add some tests (and some docs)? |
eggyal
commented
May 30, 2015
@joeybaker: Rebase, tests and docs all done. |
eggyal
commented
May 30, 2015
Hm. There is actually a small problem when using this together with #63, since then the same streams are provided on each Perhaps instead of passing in an array of streams we should pass in a stream generator function that atomify-js would then call on each rebundle? What do you think, @joeybaker? |
prevents intermittent failures.
The documentation for [`_.values(object)`](https://lodash.com/docs#values) gives an example: > _.values(new Foo); > // → [1, 2] (iteration order is not guaranteed) Since "iteration order is not guaranteed", the array of streams passed to factor-bundle may not be in the same order as the corresponding files in `entries`. Factor bundle [depends on this correlation](https://github.com/substack/factor-bundle/blob/master/index.js#L73) when building its pipeline. This commit ensures that there is never a mismatch.
The [documentation for `stream-buffers` states](https://github.com/samcday/node-stream-buffer#disclaimer): > # Disclaimer # > > Not supposed to be a speed demon, it's more for tests/debugging or weird edge cases. It works with an internal buffer that it copies contents to/from/around. Moreover, users may wish to stream the results anyway, so buffering and then converting to a string only then to stream therefrom is rather wasteful.
eggyal
commented
May 30, 2015
Now using a generator function as described above. |
joeybaker
commented
Jun 1, 2015
@eggyal nifty! The generator function makes a ton sense. My only nit-pick at this point, is that it looks like the rebase pulled in some commits to master. I can fix that up for you if you prefer? |
The documentation for
stream-buffersstates:Moreover, users may wish to stream the results anyway, so buffering and then converting to a string only then to stream therefrom is rather wasteful.