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

Function bundleSize

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

* @return {Promise }

()

Source from the content-addressed store, hash-verified

245 * @return {Promise<void>}
246 */
247async function bundleSize() {
248 if (argv.on_skipped_build) {
249 return skipBundleSize();
250 } else if (argv.on_push_build) {
251 return storeBundleSize();
252 } else if (argv.on_pr_build) {
253 return reportBundleSize();
254 } else if (argv.on_local_build) {
255 return getLocalBundleSize();
256 } else {
257 log(red('Called'), cyan('amp bundle-size'), red('with no task.'));
258 process.exitCode = 1;
259 }
260}
261
262module.exports = {
263 bundleSize,

Callers

nothing calls this directly

Calls 7

skipBundleSizeFunction · 0.85
storeBundleSizeFunction · 0.85
reportBundleSizeFunction · 0.85
getLocalBundleSizeFunction · 0.85
redFunction · 0.85
cyanFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected