chore: use `ng2tc` for compiling and running tests on ci

This commit is contained in:
Tobias Bosch 2016-05-01 22:47:49 -07:00
parent 7db911fdd4
commit fdd8bd1a36
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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<number>;
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));