Wrap old Gulp plugins to support streams.
It is pretty annoying when Gulp plugins doesn't support streams. This plugin allows you to wrap them in order to use the stream mode anyway. It is pretty useful when you want to take advantage of streams on part of your pipelines.
Note to gulp plugin developpers: This plugin should not discourage you to support streams in your own plugins. I made this plug-in to avoid beeing stucked with a bad plugin. If your underlying library support streams, please, use it! Even if it doesn't, use BufferStreams in your plugins to support streams at the plugin level (it won't block files to buffer their contents like this library has to do to work). Here is a sample of bufferstreams usage in Gulp plugins.
gulp-streamify as a development dependency:
npm install --save-dev gulp-streamify
Then, add it to your
gulpfile.js and wrap all that shit:
var streamify = ;var noStreamPlugin = ;gulp;
If you have several plugins to wrap together, prefer calling
once thanks to the function form of the
var gStreamify = ;var noStreamPlugin = ;var noStreamPlugin2 = ;var plexer = ;gulp;
Take a stream or a function returning a stream to wrap an return a stream mode compatible stream.
You may want to contribute to this project, pull requests are welcome if you accept to publish under the MIT licence.