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

Function getLocalBundleSize

build-system/tasks/bundle-size/index.js:227–242  ·  view source on GitHub ↗

* @return {Promise }

()

Source from the content-addressed store, hash-verified

225 * @return {Promise<void>}
226 */
227async function getLocalBundleSize() {
228 if ((await fastGlob(fileGlobs)).length === 0) {
229 log('Could not find runtime files.');
230 log('Run', cyan('amp dist --noextensions'), 'and re-run this task.');
231 process.exitCode = 1;
232 return;
233 } else {
234 log(
235 'Computing bundle sizes for version',
236 cyan(internalRuntimeVersion),
237 'at commit',
238 cyan(shortSha(gitCommitHash())) + '.'
239 );
240 }
241 await getBrotliBundleSizes();
242}
243
244/**
245 * @return {Promise<void>}

Callers 1

bundleSizeFunction · 0.85

Calls 5

cyanFunction · 0.85
shortShaFunction · 0.85
gitCommitHashFunction · 0.85
getBrotliBundleSizesFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected