MCPcopy Create free account
hub / github.com/angular/angular / readConfigFile

Function readConfigFile

packages/compiler-cli/src/perform_compile.ts:156–174  ·  view source on GitHub ↗
(
  configFile: string,
  host: ConfigurationHost,
  fs: FileSystem,
  extendedConfigCache?: Map<string, ts.ExtendedConfigCacheEntry>,
)

Source from the content-addressed store, hash-verified

154}
155
156function readConfigFile(
157 configFile: string,
158 host: ConfigurationHost,
159 fs: FileSystem,
160 extendedConfigCache?: Map<string, ts.ExtendedConfigCacheEntry>,
161): {config?: any; error?: ts.Diagnostic} {
162 const cacheKey = fs.isCaseSensitive() ? configFile : configFile.toLowerCase();
163 const cacheEntry = extendedConfigCache?.get(cacheKey);
164
165 if (cacheEntry) {
166 return {
167 config: cacheEntry.extendedConfig?.raw,
168 error: (cacheEntry.extendedResult as {parseDiagnostics?: ts.Diagnostic[]})
169 .parseDiagnostics?.[0],
170 };
171 }
172
173 return ts.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
174}
175
176function readAngularCompilerOptions(
177 configFile: string,

Callers 2

readConfigurationFunction · 0.85

Calls 4

isCaseSensitiveMethod · 0.65
getMethod · 0.65
readFileMethod · 0.65
resolveMethod · 0.65

Tested by

no test coverage detected