MCPcopy
hub / github.com/CesiumGS/cesium / createCesiumJs

Function createCesiumJs

scripts/build.js:293–311  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291 * @returns {Promise<string>} contents
292 */
293export async function createCesiumJs() {
294 const version = await getVersion();
295 let contents = `export const VERSION = '${version}';\n`;
296
297 // Iterate over each workspace and generate declarations for each file.
298 for (const workspace of Object.keys(workspaceSourceFiles)) {
299 const files = await globby(
300 workspaceSourceFiles[/** @type {Workspace} */ (workspace)],
301 );
302 const declarations = files.map((file) =>
303 generateDeclaration(workspace, file),
304 );
305 contents += declarations.join(`${EOL}`);
306 contents += "\n";
307 }
308 await writeFile("Source/Cesium.js", contents, { encoding: "utf-8" });
309
310 return contents;
311}
312
313/**
314 * Bundles all individual modules, optionally minifying and stripping out debug pragmas.

Callers 2

server.jsFile · 0.90
buildCesiumFunction · 0.85

Calls 3

getVersionFunction · 0.85
generateDeclarationFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…