File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -543,6 +543,7 @@ async function pruneScriptsForZip(packageJsonPath) {
543543 delete scripts [ "build-ts" ] ;
544544 delete scripts [ "build-third-party" ] ;
545545 delete scripts [ "build-apps" ] ;
546+ delete scripts [ "build-sandcastle" ] ;
546547 delete scripts . clean ;
547548 delete scripts . cloc ;
548549 delete scripts [ "build-docs" ] ;
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import gulp from "gulp";
1313import { rimraf } from "rimraf" ;
1414
1515import { mkdirp } from "mkdirp" ;
16- import { buildGalleryList } from "../packages/sandcastle/scripts/buildGallery.js" ;
1716
1817// Determines the scope of the workspace packages. If the scope is set to cesium, the workspaces should be @cesium/engine.
1918// This should match the scope of the dependencies of the root level package.json.
@@ -628,6 +627,11 @@ export async function createGalleryList(noDevelopmentGallery) {
628627 metadata,
629628 } = gallery ?? { } ;
630629
630+ // Import asynchronously for now while this script is excluded from the release zip
631+ const { buildGalleryList } = await import (
632+ "../packages/sandcastle/scripts/buildGallery.js"
633+ ) ;
634+
631635 await buildGalleryList ( {
632636 rootDirectory,
633637 publicDirectory : "../../Apps/Sandcastle2" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {
1919 createIndexJs ,
2020 buildCesium ,
2121} from "./scripts/build.js" ;
22- import { buildGalleryList } from "./packages/sandcastle/scripts/buildGallery.js" ;
2322
2423const argv = yargs ( process . argv )
2524 . options ( {
@@ -274,11 +273,16 @@ async function generateDevelopmentBuild() {
274273 ! ! stats ?. isFile ( ) && ! file . endsWith ( ".yml" ) && ! file . endsWith ( ".yaml" ) ,
275274 ignoreInitial : true ,
276275 } ) ;
277- galleryWatcher . on ( "all" , async ( event ) => {
278- if ( event === "add" || event === "change" || event === "unlink" ) {
279- await buildGalleryList ( galleryDirectory ) ;
280- }
281- } ) ;
276+ if ( ! production ) {
277+ const { buildGalleryList } = await import (
278+ "./packages/sandcastle/scripts/buildGallery.js"
279+ ) ;
280+ galleryWatcher . on ( "all" , async ( event ) => {
281+ if ( event === "add" || event === "change" || event === "unlink" ) {
282+ await buildGalleryList ( galleryDirectory ) ;
283+ }
284+ } ) ;
285+ }
282286
283287 // Rebuild jsHintOptions as needed and serve as-is
284288 app . get (
You can’t perform that action at this time.
0 commit comments