gulp-limiter

1.0.0 • Public • Published

gulp-limiter

Limits something from running more than N times in parallel.

Usage-

const limiter = require('gulp-limiter');
 
// later
gulp.task('foo', function() {
  const limit = limiter(5);
 
  // nb. you should be merging these streams before return too
  manyTasks.forEach(function() {
    gulp.src(files)
      **.pipe(limit(complexTask()))**
      .pipe(gulp.dest('./dest'));
  });
});

Limiter accepts a maximum number of tasks to run in parallel. If unspecified, uses the number of CPUs in your machine. If negative, uses the number of CPUs minus that number.

/gulp-limiter/

    Package Sidebar

    Install

    npm i gulp-limiter

    Weekly Downloads

    331

    Version

    1.0.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • samthor