https://github.com/samthor/gulp-limiter
Gulp step to limit concurrent runs of a substep
https://github.com/samthor/gulp-limiter
gulp gulp-plugin
Last synced: about 2 months ago
JSON representation
Gulp step to limit concurrent runs of a substep
- Host: GitHub
- URL: https://github.com/samthor/gulp-limiter
- Owner: samthor
- License: apache-2.0
- Created: 2016-10-28T12:28:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-22T03:17:15.000Z (about 6 years ago)
- Last Synced: 2026-03-21T00:14:05.221Z (3 months ago)
- Topics: gulp, gulp-plugin
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Limits something from running more than N times in parallel.
Available as `gulp-limiter`.
Usage-
```js
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())) // this line!
.pipe(gulp.dest('./dest'));
});
});
```
Limiter accepts a maximum number of tasks to run in parallel, but always uses a minimum of one.
If unspecified, uses the number of CPUs in your machine.
If negative, uses the number of CPUs minus that number.