npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-streamify

v1.0.2

Published

Wrap old plugins to support streams.

Downloads

63,128

Readme

gulp-streamify

Wrap old Gulp plugins to support streams.

NPM version Build status Dependency Status devDependency Status Coverage Status

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 streamify = require('gulp-streamify');
var noStreamPlugin = require('gulp-no-stream');

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

If you have several plugins to wrap together, prefer calling gulp-streamify once thanks to the function form of the gulp-streamify constructor:

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

gulp.task('stream', function(){
  gulp.src(['**/*'])
    .pipe(streamify(function() {
      var instream = noStreamPlugin();
      var outstream = noStreamPlugin2();
      instream
        .pipe(anyOtherStream)
        .pipe(outStream);
      return plexer(instream, outstream);
    }))
    .pipe(gulp.dest('/tmp'));
});

API

stream : streamify(toBeWrap)

Take a stream or a function returning a stream to wrap an return a stream mode compatible stream.

Contributing / Issues

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