refactor(compiler): emit OutputAst and not sources (#16832)
This is in preparation for creating typescript nodes directly from `OutputAst` nodes.
This commit is contained in:

committed by
Chuck Jazdzewski

parent
6123b9c0c6
commit
de8d7c65f2
@ -44,8 +44,8 @@ export class CodeGenerator {
|
||||
generatedModules.forEach(generatedModule => {
|
||||
const sourceFile = this.program.getSourceFile(generatedModule.srcFileUrl);
|
||||
const emitPath = this.ngCompilerHost.calculateEmitPath(generatedModule.genFileUrl);
|
||||
const source = GENERATED_META_FILES.test(emitPath) ? generatedModule.source :
|
||||
generatedModule.source;
|
||||
const source =
|
||||
generatedModule.source || compiler.toTypeScript(generatedModule, PREAMBLE);
|
||||
this.host.writeFile(emitPath, source, false, () => {}, [sourceFile]);
|
||||
});
|
||||
});
|
||||
@ -91,7 +91,6 @@ export class CodeGenerator {
|
||||
i18nFormat: cliOptions.i18nFormat,
|
||||
locale: cliOptions.locale, missingTranslation,
|
||||
enableLegacyTemplate: options.enableLegacyTemplate !== false,
|
||||
genFilePreamble: PREAMBLE,
|
||||
});
|
||||
return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost);
|
||||
}
|
||||
|
Reference in New Issue
Block a user