()
| 291 | * @returns {Promise<string>} contents |
| 292 | */ |
| 293 | export 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. |
no test coverage detected
searching dependent graphs…