diff --git a/scripts/ci-lite/test_js.sh b/scripts/ci-lite/test_js.sh index dfe3c2fb42..28db6b4a93 100755 --- a/scripts/ci-lite/test_js.sh +++ b/scripts/ci-lite/test_js.sh @@ -27,7 +27,7 @@ echo 'travis_fold:end:test.node' echo 'travis_fold:start:test.localChrome' # rebuild since codegen has overwritten some files. -$(npm bin)/tsc -p modules/tsconfig.json +$(npm bin)/ng2tc -p modules/tsconfig.json # Run unit tests in local chrome if [[ ${TRAVIS} ]]; then diff --git a/tools/tsc-watch/tsc_watch.ts b/tools/tsc-watch/tsc_watch.ts index e64f5a77f6..80b519d653 100644 --- a/tools/tsc-watch/tsc_watch.ts +++ b/tools/tsc-watch/tsc_watch.ts @@ -8,6 +8,7 @@ enum State { } export const TSC = 'node_modules/typescript/bin/tsc'; +export const NG2TC = 'node_modules/.bin/ng2tc'; export type Command = (stdIn, stdErr) => Promise; export class TscWatch { @@ -39,7 +40,10 @@ export class TscWatch { } watch() { - var args = [TSC, '--project', this.tsconfig]; + // TODO(tbosch): We don't support ng2tc in watch mode yet, + // so we fall back to plain tsc. However, we don't use + // the preprocessing of tsickle regarding decorators... + var args = [this.runOnce ? NG2TC : TSC, '--project', this.tsconfig]; if (!this.runOnce) args.push('--watch'); var tsc = this.runCmd(args, {}, (d) => this.consumeLine(d, false), (d) => this.consumeLine(d, true));