@@ -4,7 +4,7 @@ import { readFile, writeFile } from "fs/promises";
4
4
import { EOL } from "os" ;
5
5
import path from "path" ;
6
6
import { createRequire } from "module" ;
7
- import { finished } from ' stream/promises' ;
7
+ import { finished } from " stream/promises" ;
8
8
9
9
import esbuild from "esbuild" ;
10
10
import { globby } from "globby" ;
@@ -27,11 +27,11 @@ if (/\.0$/.test(version)) {
27
27
28
28
const copyrightHeaderTemplate = readFileSync (
29
29
path . join ( "Source" , "copyrightHeader.js" ) ,
30
- "utf8"
30
+ "utf8" ,
31
31
) ;
32
32
const combinedCopyrightHeader = copyrightHeaderTemplate . replace (
33
33
"${version}" ,
34
- version
34
+ version ,
35
35
) ;
36
36
37
37
function escapeCharacters ( token ) {
@@ -294,7 +294,7 @@ export async function createCesiumJs() {
294
294
for ( const workspace of Object . keys ( workspaceSourceFiles ) ) {
295
295
const files = await globby ( workspaceSourceFiles [ workspace ] ) ;
296
296
const declarations = files . map ( ( file ) =>
297
- generateDeclaration ( workspace , file )
297
+ generateDeclaration ( workspace , file ) ,
298
298
) ;
299
299
contents += declarations . join ( `${ EOL } ` ) ;
300
300
contents += "\n" ;
@@ -468,7 +468,7 @@ export async function glslToJavaScript(minify, minifyStateFilePath, workspace) {
468
468
`packages/${ workspace } /` ,
469
469
"Source" ,
470
470
"Shaders" ,
471
- "Builtin"
471
+ "Builtin" ,
472
472
) ;
473
473
if (
474
474
glslFile . indexOf ( path . normalize ( path . join ( baseDir , "Functions" ) ) ) === 0
@@ -505,7 +505,7 @@ export async function glslToJavaScript(minify, minifyStateFilePath, workspace) {
505
505
506
506
let copyrightComments = "" ;
507
507
const extractedCopyrightComments = contents . match (
508
- / \/ \* \* (?: [ ^ * \/ ] | \* (? ! \/ ) | \n ) * ?@ l i c e n s e (?: .| \n ) * ?\* \/ / gm
508
+ / \/ \* \* (?: [ ^ * \/ ] | \* (? ! \/ ) | \n ) * ?@ l i c e n s e (?: .| \n ) * ?\* \/ / gm,
509
509
) ;
510
510
if ( extractedCopyrightComments ) {
511
511
copyrightComments = `${ extractedCopyrightComments . join ( "\n" ) } \n` ;
@@ -526,7 +526,7 @@ export async function glslToJavaScript(minify, minifyStateFilePath, workspace) {
526
526
export default "${ contents } ";\n` ;
527
527
528
528
return writeFile ( jsFile , contents ) ;
529
- } )
529
+ } ) ,
530
530
) ;
531
531
532
532
// delete any left over JS files from old shaders
@@ -538,7 +538,7 @@ export default "${contents}";\n`;
538
538
for ( let i = 0 ; i < builtins . length ; i ++ ) {
539
539
const builtin = builtins [ i ] ;
540
540
contents . imports . push (
541
- `import czm_${ builtin } from './${ path } /${ builtin } .js'`
541
+ `import czm_${ builtin } from './${ path } /${ builtin } .js'` ,
542
542
) ;
543
543
contents . builtinLookup . push ( `czm_${ builtin } : ` + `czm_${ builtin } ` ) ;
544
544
}
@@ -554,7 +554,7 @@ export default "${contents}";\n`;
554
554
generateBuiltinContents ( contents , builtinFunctions , "Functions" ) ;
555
555
556
556
const fileContents = `//This file is automatically rebuilt by the Cesium build process.\n${ contents . imports . join (
557
- "\n"
557
+ "\n" ,
558
558
) } \n\nexport default {\n ${ contents . builtinLookup . join ( ",\n " ) } \n};\n`;
559
559
560
560
return writeFile (
@@ -563,9 +563,9 @@ export default "${contents}";\n`;
563
563
"Source" ,
564
564
"Shaders" ,
565
565
"Builtin" ,
566
- "CzmBuiltins.js"
566
+ "CzmBuiltins.js" ,
567
567
) ,
568
- fileContents
568
+ fileContents ,
569
569
) ;
570
570
}
571
571
@@ -600,7 +600,7 @@ const externalResolvePlugin = {
600
600
return {
601
601
contents,
602
602
} ;
603
- }
603
+ } ,
604
604
) ;
605
605
} ,
606
606
} ;
@@ -634,7 +634,7 @@ export async function createGalleryList(noDevelopmentGallery) {
634
634
newDemos = child_process
635
635
. execSync (
636
636
`git diff --name-only --diff-filter=A ${ tagVersion } Apps/Sandcastle/gallery/*.html` ,
637
- { stdio : [ "pipe" , "pipe" , "ignore" ] }
637
+ { stdio : [ "pipe" , "pipe" , "ignore" ] } ,
638
638
)
639
639
. toString ( )
640
640
. trim ( )
@@ -647,7 +647,7 @@ export async function createGalleryList(noDevelopmentGallery) {
647
647
const files = await globby ( fileList ) ;
648
648
files . forEach ( function ( file ) {
649
649
const demo = filePathToModuleId (
650
- path . relative ( "Apps/Sandcastle/gallery" , file )
650
+ path . relative ( "Apps/Sandcastle/gallery" , file ) ,
651
651
) ;
652
652
653
653
const demoObject = {
@@ -697,8 +697,7 @@ const has_new_gallery_demos = ${newDemos.length > 0 ? "true;" : "false;"}\n`;
697
697
] ,
698
698
minify : true ,
699
699
banner : {
700
- css :
701
- "/* This file is automatically rebuilt by the Cesium build process. */\n" ,
700
+ css : "/* This file is automatically rebuilt by the Cesium build process. */\n" ,
702
701
} ,
703
702
outfile : path . join ( "Apps" , "Sandcastle" , "templates" , "bucket.css" ) ,
704
703
} ) ;
@@ -745,7 +744,7 @@ export async function copyEngineAssets(destination) {
745
744
await copyFiles (
746
745
[ "packages/engine/Source/Widget/**" , "!packages/engine/Source/Widget/*.js" ] ,
747
746
path . join ( destination , "Widgets/CesiumWidget" ) ,
748
- "packages/engine/Source/Widget"
747
+ "packages/engine/Source/Widget" ,
749
748
) ;
750
749
}
751
750
@@ -776,7 +775,7 @@ export async function createJsHintOptions() {
776
775
const jshintrc = JSON . parse (
777
776
await readFile ( path . join ( "Apps" , "Sandcastle" , ".jshintrc" ) , {
778
777
encoding : "utf8" ,
779
- } )
778
+ } ) ,
780
779
) ;
781
780
782
781
const contents = `\
@@ -785,7 +784,7 @@ export async function createJsHintOptions() {
785
784
786
785
await writeFile (
787
786
path . join ( "Apps" , "Sandcastle" , "jsHintOptions.js" ) ,
788
- contents
787
+ contents ,
789
788
) ;
790
789
791
790
return contents ;
@@ -898,7 +897,7 @@ async function createSpecListForWorkspace(files, workspace, outputPath) {
898
897
files . forEach ( function ( file ) {
899
898
contents += `import './${ filePathToModuleId ( file ) . replace (
900
899
`packages/${ workspace } /Specs/` ,
901
- ""
900
+ "" ,
902
901
) } .js';\n`;
903
902
} ) ;
904
903
@@ -1005,7 +1004,7 @@ export const buildEngine = async (options) => {
1005
1004
await glslToJavaScript (
1006
1005
minify ,
1007
1006
"packages/engine/Build/minifyShaders.state" ,
1008
- "engine"
1007
+ "engine" ,
1009
1008
) ;
1010
1009
1011
1010
// Create index.js
@@ -1101,7 +1100,7 @@ export async function buildCesium(options) {
1101
1100
JSON . stringify ( {
1102
1101
type : "commonjs" ,
1103
1102
} ) ,
1104
- "utf8"
1103
+ "utf8" ,
1105
1104
) ;
1106
1105
1107
1106
// Create Cesium.js
@@ -1179,14 +1178,14 @@ export async function buildCesium(options) {
1179
1178
await copyFiles (
1180
1179
[ "packages/engine/Source/ThirdParty/**/*.js" ] ,
1181
1180
"Source/ThirdParty" ,
1182
- "packages/engine/Source/ThirdParty"
1181
+ "packages/engine/Source/ThirdParty" ,
1183
1182
) ;
1184
1183
1185
1184
await copyWidgetsAssets ( "Source/Widgets" ) ;
1186
1185
await copyFiles (
1187
1186
[ "packages/widgets/Source/**/*.css" ] ,
1188
1187
"Source/Widgets" ,
1189
- "packages/widgets/Source"
1188
+ "packages/widgets/Source" ,
1190
1189
) ;
1191
1190
1192
1191
// WORKAROUND:
0 commit comments