node.js - Gulp: Limit file processing concurrency; avoid processing *all files* at the same time -



node.js - Gulp: Limit file processing concurrency; avoid processing *all files* at the same time -

i have big list of images (2874) need optimized gulp-imagemin os apparently limits number of open files. can alter ulimit doesn't sense particularly portable nor safe, given file count.

this current code:

function optimizeimages() { homecoming gulp.src('images/*') .pipe(imagemin()) .pipe(gulp.dest(dest)); }

is there way run plugin on subset of files @ once? this

function exampletask() { homecoming gulp.src('images/*') .pipe(limitconcurrency(imagemin(), 50)) .pipe(gulp.dest(dest)); }

it turns out gulp updated prepare error error: emfile, many open files hadn't updated yet. concurrency issue automatically solved!

i ran in project folder:

npm update gulp

node.js gulp

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -