gulp-batch
Advanced tools
Comparing version 1.0.0 to 1.0.1
'use strict'; | ||
var array = require('stream-array'); | ||
var bach = require('bach'); | ||
var asyncDone = require('async-done'); | ||
@@ -31,8 +31,7 @@ module.exports = function (opts, cb, errorHandler) { | ||
var holdOn = true; | ||
var waiter = bach.parallel(cb.bind(cb, array(batch))); | ||
batch = []; | ||
waiter(function (err) { | ||
asyncDone(cb.bind(cb, array(batch)), function (err) { | ||
holdOn = false; | ||
if (err && typeof errorHandler === 'function') { errorHandler(err); } | ||
}); | ||
batch = []; | ||
} | ||
@@ -39,0 +38,0 @@ |
{ | ||
"name": "gulp-batch", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Event batcher for gulp-watcher", | ||
@@ -37,5 +37,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"bach": "^0.3.0", | ||
"async-done": "^0.4.0", | ||
"stream-array": "^0.1.3" | ||
} | ||
} |
@@ -14,11 +14,7 @@ # [gulp](https://github.com/gulpjs/gulp)-batch [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url] | ||
```js | ||
// npm i gulp gulp-watch gulp-mocha gulp-batch | ||
var gulp = require('gulp'); | ||
var mocha = require('gulp-mocha'); | ||
var batch = require('gulp-batch'); | ||
gulp.src(['lib/**', 'test/**'], batch(function(events) { | ||
return events | ||
.pipe(mocha({ reporter: 'list' })); | ||
gulp.watch(['lib/**', 'test/**'], batch(function(events) { | ||
return events.pipe(console.log); | ||
})); | ||
@@ -25,0 +21,0 @@ ``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
6900
39
71
+ Addedasync-done@^0.4.0
- Removedbach@^0.3.0
- Removedasync-settle@0.2.1(transitive)
- Removedbach@0.3.0(transitive)
- Removedlodash@2.4.2(transitive)
- Removednow-and-later@0.0.5(transitive)