gulpjs / vinyl

Virtual file format.
MIT License
1.28k stars 105 forks source link

Using streams only #4

Closed nfroidure closed 10 years ago

nfroidure commented 10 years ago

This is the result of the following issue: https://github.com/wearefractal/vinyl/issues/3

The idea is to deal with streams only at the Vinyl level in order to simplify higher level code.

The API still provide a way to deal with buffers but in a "stream friendly" manner (keeping asynchronous stuffs and back-pressure).

Gulp side effects:

Plugins should look like: https://gist.github.com/nfroidure/3631ecc620aec66feb4d Plugin best practice: https://gist.github.com/nfroidure/19b262e7af577ef84e0c

I know the https://github.com/lmtm/gulp-marked developer. I can use it to write a buffer based plugin migration guide. Simple version: https://github.com/nfroidure/gulp-marked/commit/33eec14ae427c782f834016da3b847b23660406c Recommended version: https://github.com/nfroidure/gulp-marked/commit/fd34059eda3862bc5bd0108bd495551eb6d01530

nfroidure commented 10 years ago

Reporting discuss here. Now we agree on keeping streams, i think we should consider keeping buffers or not.

One thing is sure, we now have a way to improve streams support (bufferstreams) and some ideas to increase buffer efficiency (cc @floatdrop).

I think, the best is to continue working on improving the current state of vinyl since it will not break anything. When we will have more datas we will be able to know if using streams only is interesting or if keeping those 2 different mechanisms make sense.

yocontra commented 10 years ago

I'm totally fine with where things are right now and the new BufferStream module makes it easy for plugin authors to optionally support streams. This issue isn't as urgent as it was before so we have time to let it sit while we discuss it more.

yocontra commented 10 years ago

Closing this since we ended up going a different direction