Comparing version 1.0.7 to 1.0.8
setInterval(() => console.log(Math.random()), 1000); |
setInterval(() => console.log(Math.random()), 1000); |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ const psTree = require('ps-tree'); |
{ | ||
"name": "tsc-watch", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "The TypeScirpt compiler with onSuccess command", | ||
@@ -5,0 +5,0 @@ "main": "tsc-watch.js", |
@@ -0,0 +0,0 @@ # The TypeScript compiler with `--watch` and a new onSuccess argument |
@@ -20,3 +20,5 @@ #!/usr/bin/env node | ||
let firstSuccessProcess = null; | ||
let firstSuccessProcessExited = null; | ||
let successProcess = null; | ||
let successProcessExited = null; | ||
@@ -68,2 +70,3 @@ function color(line) { | ||
promises.push(killer(firstSuccessProcess).then(() => firstSuccessProcess = null)); | ||
promises.push(firstSuccessProcessExited.then(() => firstSuccessProcessExited = null)); | ||
} | ||
@@ -73,2 +76,3 @@ | ||
promises.push(killer(successProcess).then(() => successProcess = null)); | ||
promises.push(successProcessExited.then(() => successProcessExited = null)); | ||
} | ||
@@ -130,4 +134,14 @@ | ||
firstSuccessProcess = runCommand(onFirstSuccessCommand); | ||
firstSuccessProcessExited = new Promise(resolve => { | ||
firstSuccessProcess.on('exit', code => { | ||
resolve(code); | ||
}); | ||
}); | ||
} else if (onSuccessCommand) { | ||
successProcess = runCommand(onSuccessCommand); | ||
successProcessExited = new Promise(resolve => { | ||
successProcess.on('exit', code => { | ||
resolve(code); | ||
}); | ||
}); | ||
} | ||
@@ -134,0 +148,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13416
172