This commit will store a cached copy of the parsed tsconfig that can be reused if the tsconfig path is the same. This will improve the ngcc "noop" case, where there is no processing to do, when the entry-points have already been processed. Previously we were parsing this config every time we checked for entry-points to process, which can take up to seconds in some cases. Resolves #36882 PR Close #37417
24 lines
949 B
TypeScript
24 lines
949 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
import {NodeJSFileSystem, setFileSystem} from '../src/ngtsc/file_system';
|
|
|
|
import {mainNgcc} from './src/main';
|
|
import {AsyncNgccOptions, SyncNgccOptions} from './src/ngcc_options';
|
|
|
|
export {ConsoleLogger} from './src/logging/console_logger';
|
|
export {Logger, LogLevel} from './src/logging/logger';
|
|
export {AsyncNgccOptions, clearTsConfigCache, NgccOptions, SyncNgccOptions} from './src/ngcc_options';
|
|
export {PathMappings} from './src/path_mappings';
|
|
|
|
export function process<T extends AsyncNgccOptions|SyncNgccOptions>(options: T):
|
|
T extends AsyncNgccOptions ? Promise<void>: void;
|
|
export function process(options: AsyncNgccOptions|SyncNgccOptions): void|Promise<void> {
|
|
setFileSystem(new NodeJSFileSystem());
|
|
return mainNgcc(options);
|
|
}
|