gulpjs/gulp — pull request #694 by stringparser (2014-09-19 15:46:46+00:00)
Title: [4.0] adds batched output for logging

Coming from #691. Similar changes:

- adds `lib/batchThese.js`
- modifies `lib/log/events.js` logging for `start` and `stop` events.

One difference with the another PR is that one can adjust how many items the batch can have based on the [`name` argument](https://github.com/stringparser/gulp/blob/4.0/lib/batchThese.js#L18-L19). 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:

```bash
# 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

```bash
# 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](https://gist.github.com/stringparser/1242d6ea95c9ece80f93)