#gulp-multi-process
Run gulp tasks in separate CPU processes
Install
npm install gulp-multi-process --save-dev
Usage
gulpfile.js
var gulp = require('gulp');
var gulpMultiProcess = require('gulp-multi-process');
gulp.task('task1', function(cb) {
});
gulp.task('task2', function(cb) {
});
gulp.task('multi', function(cb) {
return gulpMultiProcess(['task1', 'task2'], cb);
});
Warning
Run task in multiple processes is not always good for performance because spawn a different node processes is slow. It also depends on how long time it takes to require your gulpfile
.