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

Function processFile

packages/compiler-cli/preprocessor/ngp.ts:132–154  ·  view source on GitHub ↗
(
  file: AnalysisResult,
  outDir: string | null,
  compiler: HybridCompiler,
  options: RunOptions,
  chunkContext: ChunkContext,
  rootDir: string,
  tracer: Tracer,
)

Source from the content-addressed store, hash-verified

130}
131
132async function processFile(
133 file: AnalysisResult,
134 outDir: string | null,
135 compiler: HybridCompiler,
136 options: RunOptions,
137 chunkContext: ChunkContext,
138 rootDir: string,
139 tracer: Tracer,
140) {
141 const {filePath} = file;
142
143 // Declaration files are program inputs, not compilation outputs, so avoid emitting them.
144 if (filePath.endsWith('.d.ts')) {
145 return;
146 }
147
148 const fileId = tracer.newFileId(filePath);
149 try {
150 await emitFile(file, outDir, compiler, options, chunkContext, rootDir, tracer, fileId);
151 } finally {
152 tracer.asyncEnd(SpanKind.File, fileId);
153 }
154}
155
156async function emitFile(
157 file: AnalysisResult,

Callers 1

runFunction · 0.70

Calls 3

emitFileFunction · 0.85
newFileIdMethod · 0.65
asyncEndMethod · 0.65

Tested by

no test coverage detected