diff --git a/modules/@angular/compiler_cli/integrationtest.sh b/modules/@angular/compiler_cli/integrationtest.sh
index a1a889f3a0..86c88c6224 100755
--- a/modules/@angular/compiler_cli/integrationtest.sh
+++ b/modules/@angular/compiler_cli/integrationtest.sh
@@ -5,5 +5,7 @@ set -e -o pipefail
cd $(dirname $0)
cd $(pwd)/../../..
export NODE_PATH=$NODE_PATH:$(pwd)/dist/all:$(pwd)/dist/tools
-node dist/all/@angular/compiler_cli/src/main -p modules/@angular/compiler_cli/integrationtest
-node dist/tools/cjs-jasmine -- @angular/compiler_cli/integrationtest/**/*_spec.js
+readonly TESTDIR="modules/@angular/compiler_cli/integrationtest"
+rm $TESTDIR/src/*.{ngfactory,css.shim}.ts
+node dist/all/@angular/compiler_cli/src/main -p $TESTDIR
+node dist/tools/cjs-jasmine -- $TESTDIR/**/*_spec.js
diff --git a/modules/@angular/compiler_cli/integrationtest/tsconfig.json b/modules/@angular/compiler_cli/integrationtest/tsconfig.json
index 07d017a174..5a4f51baae 100644
--- a/modules/@angular/compiler_cli/integrationtest/tsconfig.json
+++ b/modules/@angular/compiler_cli/integrationtest/tsconfig.json
@@ -14,10 +14,15 @@
"outDir": "../../../../dist/all/@angular/compiler_cli/integrationtest",
"rootDir": "",
"declaration": true,
-
+ "lib": ["es6", "dom"],
"baseUrl": ".",
"paths": {
"@angular/*": ["../../../../dist/all/@angular/*"]
}
- }
+ },
+
+ "files": [
+ "src/bootstrap.ts",
+ "typings.d.ts"
+ ]
}
diff --git a/modules/@angular/compiler_cli/integrationtest/typings.d.ts b/modules/@angular/compiler_cli/integrationtest/typings.d.ts
index b233a0dc0c..b99e33358e 100644
--- a/modules/@angular/compiler_cli/integrationtest/typings.d.ts
+++ b/modules/@angular/compiler_cli/integrationtest/typings.d.ts
@@ -1,4 +1,2 @@
-///
-///
///
///
diff --git a/modules/@angular/compiler_cli/src/codegen.ts b/modules/@angular/compiler_cli/src/codegen.ts
index be4f8152e2..546e473882 100644
--- a/modules/@angular/compiler_cli/src/codegen.ts
+++ b/modules/@angular/compiler_cli/src/codegen.ts
@@ -155,8 +155,10 @@ export class CodeGenerator {
return Promise.all(stylesheetPromises);
})
.catch((e) => { console.error(e.stack); });
- return Promise.all(
- this.program.getRootFileNames().filter(f => !GENERATED_FILES.test(f)).map(generateOneFile));
+ return Promise.all(this.program.getSourceFiles()
+ .map(sf => sf.fileName)
+ .filter(f => !GENERATED_FILES.test(f))
+ .map(generateOneFile));
}
static create(ngOptions: AngularCompilerOptions, program: ts.Program, options: ts.CompilerOptions,