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

Function build

build-system/tasks/build.js:42–69  ·  view source on GitHub ↗

* Unminified build. Entry point for `amp build`. * @return {Promise }

()

Source from the content-addressed store, hash-verified

40 * @return {Promise<void>}
41 */
42async function build() {
43 const handlerProcess = createCtrlcHandler('build');
44 process.env.NODE_ENV = 'development';
45 const options = {
46 fortesting: argv.fortesting,
47 localDev: true,
48 minify: false,
49 watch: argv.watch,
50 };
51 printNobuildHelp();
52 printConfigHelp('amp build');
53 parseExtensionFlags();
54 await runPreBuildSteps(options);
55 if (argv.core_runtime_only) {
56 await compileCoreRuntime(options);
57 } else {
58 await compileAllJs(options);
59 }
60 await buildExtensions(options);
61
62 // This step is to be run only during a full `amp build`.
63 if (shouldBuildVendorConfigs()) {
64 await buildVendorConfigs(options);
65 }
66 if (!argv.watch) {
67 exitCtrlcHandler(handlerProcess);
68 }
69}
70
71module.exports = {
72 build,

Callers

nothing calls this directly

Calls 9

printNobuildHelpFunction · 0.85
printConfigHelpFunction · 0.85
parseExtensionFlagsFunction · 0.85
runPreBuildStepsFunction · 0.85
compileCoreRuntimeFunction · 0.85
compileAllJsFunction · 0.85
buildExtensionsFunction · 0.85
shouldBuildVendorConfigsFunction · 0.85
buildVendorConfigsFunction · 0.85

Tested by

no test coverage detected