diff --git a/scripts/ci-lite/test_js.sh b/scripts/ci-lite/test_js.sh index 246ca9af0a..241fc4fe5d 100755 --- a/scripts/ci-lite/test_js.sh +++ b/scripts/ci-lite/test_js.sh @@ -18,7 +18,7 @@ cd ../.. echo 'travis_fold:start:test.unit.tools' # Run unit tests in tools -node ./dist/tools/tsc-watch/ tools triggerCmds +node ./dist/tools/tsc-watch/ tools runCmdsOnly echo 'travis_fold:end:test.unit.tools' @@ -26,7 +26,7 @@ echo 'travis_fold:end:test.unit.tools' echo 'travis_fold:start:test.unit.node' # Run unit tests in node -node ./dist/tools/tsc-watch/ node triggerCmds +node ./dist/tools/tsc-watch/ node runCmdsOnly echo 'travis_fold:end:test.unit.node' diff --git a/tools/tsc-watch/index.ts b/tools/tsc-watch/index.ts index 2f6818658c..9eb9a304ce 100644 --- a/tools/tsc-watch/index.ts +++ b/tools/tsc-watch/index.ts @@ -103,8 +103,8 @@ if (platform == 'node') { if (runMode === 'watch') { tscWatch.watch(); -} else if (runMode === 'triggerCmds') { - tscWatch.triggerCmds(); +} else if (runMode === 'runCmdsOnly') { + tscWatch.runCmdsOnly(); } else { tscWatch.run(); } diff --git a/tools/tsc-watch/tsc_watch.ts b/tools/tsc-watch/tsc_watch.ts index e64f5a77f6..fe9d25c709 100644 --- a/tools/tsc-watch/tsc_watch.ts +++ b/tools/tsc-watch/tsc_watch.ts @@ -81,6 +81,11 @@ export class TscWatch { this.watch(); } + runCmdsOnly() { + this.runOnce = true; + this.triggerCmds(); + } + consumeLine(buffer: Buffer, isStdError: boolean) { var line = '' + buffer; if (contains(line, this.start)) {