MCPcopy Index your code
hub / github.com/ampproject/amphtml / firebase

Function firebase

build-system/tasks/firebase.js:45–71  ·  view source on GitHub ↗

* @return {Promise }

()

Source from the content-addressed store, hash-verified

43 * @return {Promise<void>}
44 */
45async function firebase() {
46 if (!argv.nobuild) {
47 await buildRuntime();
48 }
49 await fs.mkdirp('firebase');
50 if (argv.file) {
51 log(green(`Processing file: ${argv.file}.`));
52 log(green('Writing file to firebase.index.html.'));
53 await fs.copyFile(/*src*/ argv.file, 'firebase/index.html');
54 await replaceUrls('firebase/index.html');
55 } else {
56 log(green('Copying test/manual and examples folders.'));
57 await Promise.all([
58 copyAndReplaceUrls('test/manual', 'firebase/manual'),
59 copyAndReplaceUrls('examples', 'firebase/examples'),
60 ]);
61 }
62 log(green('Copying local amp files from dist folder.'));
63 await Promise.all([
64 fs.copy('dist', 'firebase/dist', {overwrite: true}),
65 fs.copy('dist.3p/current', 'firebase/dist.3p/current', {overwrite: true}),
66 ]);
67
68 await Promise.all([
69 fs.copyFile('firebase/dist/ww.max.js', 'firebase/dist/ww.js'),
70 ]);
71}
72
73/**
74 * @param {string} filePath

Callers

nothing calls this directly

Calls 5

buildRuntimeFunction · 0.85
greenFunction · 0.85
copyAndReplaceUrlsFunction · 0.85
replaceUrlsFunction · 0.70
logFunction · 0.50

Tested by

no test coverage detected