* Unminified build. Entry point for `amp build`. * @return {Promise }
()
| 40 | * @return {Promise<void>} |
| 41 | */ |
| 42 | async 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 | |
| 71 | module.exports = { |
| 72 | build, |
nothing calls this directly
no test coverage detected