Giter Club home page Giter Club logo

gulp-streamify's Introduction

gulp-streamify NPM version Build status

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.

Usage

First, install 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 gStreamify = require('gulp-streamify')
  , noStreamPlugin = require('gulp-no-stream')
;

gulp.task('stream', function(){
  gulp.src(['**/*'])
    .pipe( gStreamify( noStreamPlugin() ) )
    .pipe(gulp.dest('/tmp'));
});

If you have several plugins to wrap together, prefer calling gulp-streamify once:

var gStreamify = require('gulp-streamify')
  , noStreamPlugin = require('gulp-no-stream')
  , noStreamPlugin2 = require('gulp-no-stream2')
;

gulp.task('stream', function(){
  gulp.src(['**/*'])
    .pipe(gStreamify(
      noStreamPlugin().pipe(noStreamPlugin2())
    ))
    .pipe(gulp.dest('/tmp'));
});

Contributing / Issues

You may want to contribute to this project, pull requests are welcome if you accept to publish under the MIT licence.

gulp-streamify's People

Contributors

nfroidure avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.