build: produce metadata bundles for @angular modules (#14509)

Closes #14509
This commit is contained in:
Chuck Jazdzewski
2017-02-15 13:30:40 -08:00
committed by Igor Minar
parent 3b896709a9
commit 724ca373e7
35 changed files with 348 additions and 165 deletions

View File

@ -31,8 +31,9 @@ function main() {
class AssertingHostContext extends NodeCompilerHostContext {
readFile(fileName: string): string {
if (/.*\/node_modules\/.*/.test(fileName) && !/.*ngsummary\.json$/.test(fileName)) {
// Only allow to read summaries from node_modules
if (/.*\/node_modules\/.*/.test(fileName) && !/.*ngsummary\.json$/.test(fileName) &&
!/package\.json$/.test(fileName)) {
// Only allow to read summaries and package.json files from node_modules
return null;
}
readFiles.push(path.relative(basePath, fileName));