respawn-group
Advanced tools
Comparing version 0.6.1 to 0.6.2
12
index.js
var respawn = require('respawn'); | ||
var xtend = require('xtend'); | ||
var afterAll = require('after-all'); | ||
var events = require('events'); | ||
@@ -127,10 +128,7 @@ | ||
var list = Object.keys(monitors); | ||
var loop = function() { | ||
var next = list.shift(); | ||
if (!next) return cb && cb(); | ||
group.stop(next, loop); | ||
}; | ||
var next = afterAll(cb); | ||
loop(); | ||
Object.keys(monitors).forEach(function(name) { | ||
group.stop(name, next()); | ||
}); | ||
}; | ||
@@ -137,0 +135,0 @@ |
{ | ||
"name": "respawn-group", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Manage a group of respawn monitors", | ||
@@ -8,4 +8,5 @@ "repository": "git://github.com/mafintosh/respawn-group.git", | ||
"dependencies": { | ||
"xtend": "~2.1.1", | ||
"respawn": "~0.4.2" | ||
"after-all": "^1.0.0", | ||
"respawn": "~0.4.2", | ||
"xtend": "~2.1.1" | ||
}, | ||
@@ -12,0 +13,0 @@ "keywords": [ |
5446
3
104
+ Addedafter-all@^1.0.0
+ Addedafter-all@1.1.0(transitive)