Created by: stringparser
Coming from #691. Similar changes:
- adds
lib/batchThese.js
- modifies
lib/log/events.js
logging forstart
andstop
events.
One difference with the another PR is that one can adjust how many items the batch can have based on the name
argument. That is because the start
event for example fires more often than other events. If you "push" it to wait for the next batch you can end up with something like this:
# js:pipeline -> gulp.series('jsx', 'js');
# css:pipeline -> gulp.series('css');
# default -> gulp.parallel('js:pipeline', 'css:pipeline');
[17:10:37] Starting 'default', 'js:pipeline', 'css:pipeline', 'jsx'
[17:10:37] Finished 'css:pipeline' after 1.09 ms, 'jsx' after 1.06 ms,
[17:10:37] 'js' after 63 μs
[17:10:37] Starting 'js'
[17:10:37] Finished 'js:pipeline' after 2.21 ms, 'default' after 3.24 ms
instead of this
# added minify to the js:pipeline to se if it worked
[17:22:57] Starting 'default', 'js:pipeline', 'css:pipeline', 'jsx', 'js', 'minify'
[17:22:57] Finished 'css:pipeline' after 798 μs, 'jsx' after 765 μs,
[17:22:57] 'js' after 56 μs, 'minify' after 409 μs
[17:22:57] Finished 'js:pipeline' after 2.33 ms, 'default' after 3.44 ms
thus wishing to have batches with different length.
The gulpfile is on this gist