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

Function defaultTask

build-system/tasks/default-task.js:28–44  ·  view source on GitHub ↗

* The default task run when `amp` is executed * * @return {!Promise}

()

Source from the content-addressed store, hash-verified

26 * @return {!Promise}
27 */
28async function defaultTask() {
29 createCtrlcHandler('amp');
30 process.env.NODE_ENV = 'development';
31 printConfigHelp('amp');
32 printDefaultTaskHelp();
33 parseExtensionFlags(/* preBuild */ true);
34
35 const options = {fortesting: true, minify: argv.minified, watch: true};
36 if (argv.minified) {
37 await runPreDistSteps(options);
38 } else {
39 await runPreBuildSteps(options);
40 }
41
42 await doServe(/* lazyBuild */ true);
43 log(green('JS and extensions will be lazily built when requested...'));
44}
45
46module.exports = {
47 defaultTask,

Callers

nothing calls this directly

Calls 8

printConfigHelpFunction · 0.85
printDefaultTaskHelpFunction · 0.85
parseExtensionFlagsFunction · 0.85
runPreDistStepsFunction · 0.85
runPreBuildStepsFunction · 0.85
doServeFunction · 0.85
greenFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected