tsc-watch
Advanced tools
Comparing version 2.1.2 to 2.2.0
# @gilamran/tsc-watch CHANGELOG | ||
## v2.2.0 - 27/11/2018 | ||
Waiting for all the child processes to showdown before closing - (Thanks to @MartinLoeper) | ||
## v2.1.0 - 27/11/2018 | ||
@@ -4,0 +8,0 @@ |
@@ -18,16 +18,12 @@ const psTree = require('ps-tree'); | ||
module.exports = function kill(child) { | ||
return new Promise((resolve, reject) => { | ||
return new Promise(resolve => { | ||
if (isWindows) { | ||
exec('taskkill /pid ' + child.pid + ' /T /F'); | ||
resolve(); | ||
exec('taskkill /pid ' + child.pid + ' /T', () => resolve()); | ||
} else { | ||
if (hasPS) { | ||
psTree(child.pid, function(err, kids) { | ||
spawn('kill', ['-s', KILL_SIGNAL, child.pid].concat( kids.map(function(p) { return p.PID; }) )).on('close', resolve); | ||
spawn('kill', ['-s', KILL_SIGNAL, child.pid].concat( kids.map(function(p) { return p.PID; }) )).on('close', () => resolve()); | ||
}); | ||
} else { | ||
exec('kill -s ' + KILL_SIGNAL + ' ' + child.pid, function() { | ||
// ignore if the process has been killed already | ||
resolve(); | ||
}); | ||
exec('kill -s ' + KILL_SIGNAL + ' ' + child.pid, () => resolve()); | ||
} | ||
@@ -34,0 +30,0 @@ } |
@@ -88,4 +88,7 @@ #!/usr/bin/env node | ||
nodeCleanup((_exitCode, signal) => { | ||
killProcesses(true); | ||
tscProcess.kill(signal); | ||
killProcesses(true).then(() => process.exit()); | ||
// don't call cleanup handler again | ||
nodeCleanup.uninstall(); | ||
return false; | ||
}); |
{ | ||
"name": "tsc-watch", | ||
"version": "2.1.2", | ||
"version": "2.2.0", | ||
"description": "The TypeScript compiler with onSuccess command", | ||
@@ -5,0 +5,0 @@ "scripts": { |
25519
24
452