build: add --projects a.k.a the turbo button

we can now filter build graph via --project flag to speed up build performance

usage:

gulp test.unit.js --project=angular2,angular2_material

Closes #5272
This commit is contained in:
Igor Minar
2015-11-13 01:58:17 -08:00
parent 2ecbd0eaaf
commit 1d9c44b34f
6 changed files with 192 additions and 100 deletions

View File

@ -47,6 +47,12 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
// in tsc 1.7.x this api was renamed to parseJsonConfigFileContent
// the conversion is a bit awkward, see https://github.com/Microsoft/TypeScript/issues/5276
this.tsOpts = ts.parseConfigFile({compilerOptions: options, files: []}, null, null).options;
// TODO: the above turns rootDir set to './' into an empty string - looks like a tsc bug
// check back when we upgrade to 1.7.x
if (this.tsOpts.rootDir === '') {
this.tsOpts.rootDir = './';
}
this.tsOpts.outDir = this.cachePath;
this.tsServiceHost = new CustomLanguageServiceHost(this.tsOpts, this.rootFilePaths,