* Returns CesiumJS bundles configured for development. * * @returns {Bundles} The bundles.
()
| 60 | * @returns {Bundles} The bundles. |
| 61 | */ |
| 62 | async function generateDevelopmentBuild() { |
| 63 | const startTime = performance.now(); |
| 64 | |
| 65 | // Build @cesium/engine index.js |
| 66 | console.log("[1/3] Building @cesium/engine..."); |
| 67 | const engineContexts = await buildEngine({ |
| 68 | incremental: true, |
| 69 | minify: false, |
| 70 | write: false, |
| 71 | }); |
| 72 | |
| 73 | // Build @cesium/widgets index.js |
| 74 | console.log("[2/3] Building @cesium/widgets..."); |
| 75 | const widgetContexts = await buildWidgets({ |
| 76 | incremental: true, |
| 77 | minify: false, |
| 78 | write: false, |
| 79 | }); |
| 80 | |
| 81 | // Build CesiumJS and save returned contexts for rebuilding upon request |
| 82 | console.log("[3/3] Building CesiumJS..."); |
| 83 | const contexts = await buildCesium({ |
| 84 | iife: true, |
| 85 | incremental: true, |
| 86 | minify: false, |
| 87 | node: false, |
| 88 | outputDirectory: outputDirectory, |
| 89 | removePragmas: false, |
| 90 | sourcemap: true, |
| 91 | write: false, |
| 92 | }); |
| 93 | |
| 94 | console.log( |
| 95 | `Cesium built in ${formatTimeSinceInSeconds(startTime)} seconds.`, |
| 96 | ); |
| 97 | |
| 98 | return { ...contexts, engine: engineContexts, widgets: widgetContexts }; |
| 99 | } |
| 100 | |
| 101 | // Delay execution of the callback until a short time has elapsed since it was last invoked, preventing |
| 102 | // calls to the same function in quick succession from triggering multiple builds. |
no test coverage detected
searching dependent graphs…