MCPcopy
hub / github.com/ampproject/amphtml / getCompiledFile

Function getCompiledFile

build-system/tasks/helpers.js:178–187  ·  view source on GitHub ↗

* Returns compiled file to prepend within wrapper and empty string if none. * * @param {string} srcFilename * @return {Promise }

(srcFilename)

Source from the content-addressed store, hash-verified

176 * @return {Promise<string>}
177 */
178async function getCompiledFile(srcFilename) {
179 const bundleFiles = EXTENSION_BUNDLE_MAP[srcFilename];
180 if (!bundleFiles) {
181 return '';
182 }
183 const filesContents = await Promise.all(
184 bundleFiles.map((file) => fs.readFile(file, 'utf8'))
185 );
186 return filesContents.join('\n');
187}
188
189/**
190 * @param {string} name

Callers 1

esbuildCompileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected