refactor(compiler): don’t write summaries for jit by default

The default is false externally but true internally at Google.
This commit is contained in:
Tobias Bosch
2017-06-09 14:00:03 -07:00
committed by Alex Rickabaugh
parent d56b7ed96d
commit 90b0713e32
11 changed files with 79 additions and 12 deletions

View File

@ -100,6 +100,7 @@ export class CodeGenerator {
i18nFormat: cliOptions.i18nFormat,
locale: cliOptions.locale, missingTranslation,
enableLegacyTemplate: options.enableLegacyTemplate !== false,
enableSummariesForJit: options.enableSummariesForJit !== false,
});
return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost);
}

View File

@ -20,6 +20,10 @@ import {CodeGenerator} from './codegen';
function codegen(
ngOptions: tsc.AngularCompilerOptions, cliOptions: tsc.NgcCliOptions, program: ts.Program,
host: ts.CompilerHost) {
if (ngOptions.enableSummariesForJit === undefined) {
// default to false
ngOptions.enableSummariesForJit = false;
}
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}

View File

@ -99,10 +99,15 @@ export class NgTools_InternalApi_NG_2 {
missingTranslation: options.missingTranslation !,
basePath: options.basePath
};
const ngOptions = options.angularCompilerOptions;
if (ngOptions.enableSummariesForJit === undefined) {
// default to false
ngOptions.enableSummariesForJit = false;
}
// Create the Code Generator.
const codeGenerator = CodeGenerator.create(
options.angularCompilerOptions, cliOptions, options.program, options.host, hostContext);
const codeGenerator =
CodeGenerator.create(ngOptions, cliOptions, options.program, options.host, hostContext);
return codeGenerator.codegen();
}