diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4c32796e..3c0b905ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: contents: write id-token: write env: - GOOGLE_MAPS_JS_SAMPLES_KEY: "${{ secrets.GOOGLE_MAPS_JS_SAMPLES_KEY }}" + GOOGLE_MAPS_API_KEY: "${{ secrets.GOOGLE_MAPS_API_KEY }}" steps: - name: Checkout main uses: actions/checkout@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f6855980..b0d434166 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,7 @@ on: env: SKIP_DIST: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }} + GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -137,6 +138,7 @@ jobs: done env: STEPS_GET_WORKSPACES_OUTPUTS_CHANGED_WORKSPACES: ${{ steps.get_workspaces.outputs.changed_workspaces }} + GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}" - name: Generate Index (Run Once After Builds) run: bash samples/generate-index.sh @@ -151,6 +153,7 @@ jobs: # Pass the correct base reference for find-changes.sh when called by samples.spec.ts GIT_BASE_REF: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before }} CI: true + GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}" - name: Upload Test Report Artifact uses: actions/upload-artifact@v4 @@ -203,6 +206,8 @@ jobs: - name: Build All Projects run: npm run build-all + env: + GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}" - name: Generate Index (Run Once After Full Builds) run: bash samples/generate-index.sh @@ -216,6 +221,7 @@ jobs: env: CI: true TEST_ALL_SAMPLES: "true" + GOOGLE_MAPS_API_KEY: "${{ secrets.JS_MAPS_DEV }}" - name: Upload Test Report Artifact uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index 3e832de20..96c83ee38 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ samples/.env # Ignore dist files generated by build. samples/*/dist/ samples/*/*.js +!samples/*/vite.config.js # Ignore playwright outputs /test-results/ diff --git a/e2e/samples.spec.ts b/e2e/samples.spec.ts index f4a4d5f11..ac9ddc21a 100644 --- a/e2e/samples.spec.ts +++ b/e2e/samples.spec.ts @@ -146,7 +146,7 @@ foldersToTest.forEach((sampleFolder) => { // START run the preview // Get an available port const port = 8080; - const url = `http://localhost:${port}/`; + const url = `http://localhost:${port}/samples/${sampleFolder}/dist/`; const viteProcess = childProcess.spawn( 'vite', @@ -154,7 +154,6 @@ foldersToTest.forEach((sampleFolder) => { { cwd: path.join(samplesDir, sampleFolder), stdio: 'inherit', - detached: true, // Allows parent to exit independently, though we kill it in finally } ); @@ -252,8 +251,8 @@ foldersToTest.forEach((sampleFolder) => { ); } } - // Add a small delay to allow the process to terminate - await page.waitForTimeout(500); + // Add a small delay to allow the process to terminate without depending on the potentially closed page object + await new Promise((resolve) => setTimeout(resolve, 500)); } }); }); diff --git a/samples/3d-accessibility-features/index.html b/samples/3d-accessibility-features/index.html index 920f5be5a..4a357d88e 100644 --- a/samples/3d-accessibility-features/index.html +++ b/samples/3d-accessibility-features/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-accessibility-features/vite.config.js b/samples/3d-accessibility-features/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-accessibility-features/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-camera-boundary/index.html b/samples/3d-camera-boundary/index.html index f84395145..b2c63bac8 100644 --- a/samples/3d-camera-boundary/index.html +++ b/samples/3d-camera-boundary/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-camera-boundary/vite.config.js b/samples/3d-camera-boundary/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-camera-boundary/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-camera-center/index.html b/samples/3d-camera-center/index.html index d5185bf35..b13f7c289 100644 --- a/samples/3d-camera-center/index.html +++ b/samples/3d-camera-center/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-camera-center/vite.config.js b/samples/3d-camera-center/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-camera-center/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-camera-position/index.html b/samples/3d-camera-position/index.html index a88c3fbf6..0efeafcce 100644 --- a/samples/3d-camera-position/index.html +++ b/samples/3d-camera-position/index.html @@ -13,7 +13,7 @@ diff --git a/samples/3d-camera-position/index.ts b/samples/3d-camera-position/index.ts index e58f8330d..3572ae730 100644 --- a/samples/3d-camera-position/index.ts +++ b/samples/3d-camera-position/index.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ // [START maps_3d_camera_position] -async function initMap(): Promise { +async function init(): Promise { // Declare the needed libraries. await google.maps.importLibrary('maps3d'); @@ -148,5 +148,5 @@ async function initMap(): Promise { setTimeout(updateUI, 500); } -void initMap(); +void init(); // [END maps_3d_camera_position] diff --git a/samples/3d-camera-position/package.json b/samples/3d-camera-position/package.json index 94e7c0c98..3d8a26d1f 100644 --- a/samples/3d-camera-position/package.json +++ b/samples/3d-camera-position/package.json @@ -2,11 +2,10 @@ "name": "@js-api-samples/3d-camera-position", "version": "1.0.0", "scripts": { - "build": "tsc && bash ../jsfiddle.sh 3d-camera-position && bash ../app.sh 3d-camera-position && bash ../docs.sh 3d-camera-position && npm run build:vite --workspace=. && bash ../dist.sh 3d-camera-position", + "build": "bash ../build-single.sh", "test": "tsc && npm run build:vite --workspace=.", "start": "tsc && vite build --base './' && vite", "build:vite": "vite build --base './'", "preview": "vite preview" - }, - "dependencies": {} + } } diff --git a/samples/3d-camera-position/vite.config.js b/samples/3d-camera-position/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-camera-position/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-camera-to-around/index.html b/samples/3d-camera-to-around/index.html index 82ca9d5e9..498f4b6cf 100644 --- a/samples/3d-camera-to-around/index.html +++ b/samples/3d-camera-to-around/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-camera-to-around/vite.config.js b/samples/3d-camera-to-around/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-camera-to-around/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-clamp-mode/index.html b/samples/3d-clamp-mode/index.html index abf9d5efc..14dec6f9c 100644 --- a/samples/3d-clamp-mode/index.html +++ b/samples/3d-clamp-mode/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-clamp-mode/vite.config.js b/samples/3d-clamp-mode/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-clamp-mode/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-coverage-map/index.html b/samples/3d-coverage-map/index.html index 6c05d75bd..1b1e509c4 100644 --- a/samples/3d-coverage-map/index.html +++ b/samples/3d-coverage-map/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-coverage-map/vite.config.js b/samples/3d-coverage-map/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-coverage-map/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-hero-showcase/index.html b/samples/3d-hero-showcase/index.html index 50cb6a31b..6bd4b0e46 100644 --- a/samples/3d-hero-showcase/index.html +++ b/samples/3d-hero-showcase/index.html @@ -23,7 +23,7 @@ diff --git a/samples/3d-hero-showcase/vite.config.js b/samples/3d-hero-showcase/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-hero-showcase/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-label-toggle/index.html b/samples/3d-label-toggle/index.html index 50e618165..fd267adeb 100644 --- a/samples/3d-label-toggle/index.html +++ b/samples/3d-label-toggle/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-label-toggle/vite.config.js b/samples/3d-label-toggle/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-label-toggle/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-localization/index.html b/samples/3d-localization/index.html index 934afff74..10338fa23 100644 --- a/samples/3d-localization/index.html +++ b/samples/3d-localization/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-localization/vite.config.js b/samples/3d-localization/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-localization/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-map-45-degree-locked/index.html b/samples/3d-map-45-degree-locked/index.html index 95e0fdc4e..05dde4845 100644 --- a/samples/3d-map-45-degree-locked/index.html +++ b/samples/3d-map-45-degree-locked/index.html @@ -12,7 +12,7 @@ + src="https://maps.googleapis.com/maps/api/js?loading=async&key=GOOGLE_MAPS_API_KEY&libraries=maps3d"> // prettier-ignore (g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({ - key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8" + key: "GOOGLE_MAPS_API_KEY" }); diff --git a/samples/3d-map-45-degree/vite.config.js b/samples/3d-map-45-degree/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-map-45-degree/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-map-events/index.html b/samples/3d-map-events/index.html index 546f6a604..e876aee0b 100644 --- a/samples/3d-map-events/index.html +++ b/samples/3d-map-events/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-map-events/vite.config.js b/samples/3d-map-events/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-map-events/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-map-roadmap/index.html b/samples/3d-map-roadmap/index.html index 518bcec02..93eb437fe 100644 --- a/samples/3d-map-roadmap/index.html +++ b/samples/3d-map-roadmap/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-map-roadmap/vite.config.js b/samples/3d-map-roadmap/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-map-roadmap/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-map-styling/index.html b/samples/3d-map-styling/index.html index c624d2af1..b25e17add 100644 --- a/samples/3d-map-styling/index.html +++ b/samples/3d-map-styling/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-map-styling/vite.config.js b/samples/3d-map-styling/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-map-styling/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-marker-click-event/index.html b/samples/3d-marker-click-event/index.html index eccdc4ca0..3d1892105 100644 --- a/samples/3d-marker-click-event/index.html +++ b/samples/3d-marker-click-event/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-marker-click-event/vite.config.js b/samples/3d-marker-click-event/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-marker-click-event/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-marker-collision-behavior/index.html b/samples/3d-marker-collision-behavior/index.html index 1eac263d4..46f1e0633 100644 --- a/samples/3d-marker-collision-behavior/index.html +++ b/samples/3d-marker-collision-behavior/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-marker-collision-behavior/vite.config.js b/samples/3d-marker-collision-behavior/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-marker-collision-behavior/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-marker-customization/index.html b/samples/3d-marker-customization/index.html index 5a3bbf27e..c466ccf4c 100644 --- a/samples/3d-marker-customization/index.html +++ b/samples/3d-marker-customization/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-marker-customization/vite.config.js b/samples/3d-marker-customization/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-marker-customization/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-marker-graphics/index.html b/samples/3d-marker-graphics/index.html index 9e74e9377..6f03685de 100644 --- a/samples/3d-marker-graphics/index.html +++ b/samples/3d-marker-graphics/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-marker-graphics/vite.config.js b/samples/3d-marker-graphics/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-marker-graphics/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-marker-html/index.html b/samples/3d-marker-html/index.html index d62dc5760..af5eca845 100644 --- a/samples/3d-marker-html/index.html +++ b/samples/3d-marker-html/index.html @@ -11,7 +11,7 @@ + src="https://maps.googleapis.com/maps/api/js?loading=async&key=GOOGLE_MAPS_API_KEY&libraries=maps3d"> // prettier-ignore (g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({ - key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8" + key: "GOOGLE_MAPS_API_KEY" }); diff --git a/samples/3d-marker-interactive/vite.config.js b/samples/3d-marker-interactive/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-marker-interactive/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-mesh-flatten/index.html b/samples/3d-mesh-flatten/index.html index 340abb122..ec3bdf8f1 100644 --- a/samples/3d-mesh-flatten/index.html +++ b/samples/3d-mesh-flatten/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-mesh-flatten/vite.config.js b/samples/3d-mesh-flatten/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-mesh-flatten/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-model-interactive/index.html b/samples/3d-model-interactive/index.html index 70d9ca97e..6e117d52c 100644 --- a/samples/3d-model-interactive/index.html +++ b/samples/3d-model-interactive/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-model-interactive/vite.config.js b/samples/3d-model-interactive/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-model-interactive/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-model/index.html b/samples/3d-model/index.html index 251fc359a..4e8733f24 100644 --- a/samples/3d-model/index.html +++ b/samples/3d-model/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-model/vite.config.js b/samples/3d-model/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-model/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-places-autocomplete/index.html b/samples/3d-places-autocomplete/index.html index b17e1fb08..31340f94c 100644 --- a/samples/3d-places-autocomplete/index.html +++ b/samples/3d-places-autocomplete/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-places-autocomplete/vite.config.js b/samples/3d-places-autocomplete/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-places-autocomplete/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-places/index.html b/samples/3d-places/index.html index 1f45b428e..30be37953 100644 --- a/samples/3d-places/index.html +++ b/samples/3d-places/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-places/vite.config.js b/samples/3d-places/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-places/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-polygon-click-event/index.html b/samples/3d-polygon-click-event/index.html index 78311109d..385ce3e1b 100644 --- a/samples/3d-polygon-click-event/index.html +++ b/samples/3d-polygon-click-event/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-polygon-click-event/vite.config.js b/samples/3d-polygon-click-event/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-polygon-click-event/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-polygon-extruded-hole/index.html b/samples/3d-polygon-extruded-hole/index.html index 813b87add..f06491b0e 100644 --- a/samples/3d-polygon-extruded-hole/index.html +++ b/samples/3d-polygon-extruded-hole/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-polygon-extruded-hole/vite.config.js b/samples/3d-polygon-extruded-hole/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-polygon-extruded-hole/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-polygon/index.html b/samples/3d-polygon/index.html index b1a96cffe..7093f6e17 100644 --- a/samples/3d-polygon/index.html +++ b/samples/3d-polygon/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-polygon/vite.config.js b/samples/3d-polygon/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-polygon/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-polyline-click-event/index.html b/samples/3d-polyline-click-event/index.html index 38aa48b32..e125de38f 100644 --- a/samples/3d-polyline-click-event/index.html +++ b/samples/3d-polyline-click-event/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-polyline-click-event/vite.config.js b/samples/3d-polyline-click-event/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-polyline-click-event/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-polyline-extruded/index.html b/samples/3d-polyline-extruded/index.html index cb45394d1..85e55c69d 100644 --- a/samples/3d-polyline-extruded/index.html +++ b/samples/3d-polyline-extruded/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-polyline-extruded/vite.config.js b/samples/3d-polyline-extruded/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-polyline-extruded/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-polyline/index.html b/samples/3d-polyline/index.html index 543d55f95..3acf96de4 100644 --- a/samples/3d-polyline/index.html +++ b/samples/3d-polyline/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-polyline/vite.config.js b/samples/3d-polyline/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-polyline/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-popover-location/index.html b/samples/3d-popover-location/index.html index e7e8c1552..deddda3e3 100644 --- a/samples/3d-popover-location/index.html +++ b/samples/3d-popover-location/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-popover-location/vite.config.js b/samples/3d-popover-location/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-popover-location/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-popover-marker/index.html b/samples/3d-popover-marker/index.html index b8b4a7196..31c462963 100644 --- a/samples/3d-popover-marker/index.html +++ b/samples/3d-popover-marker/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-popover-marker/vite.config.js b/samples/3d-popover-marker/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-popover-marker/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-simple-map-declarative/index.html b/samples/3d-simple-map-declarative/index.html index 945ac2d0f..2e5ead07c 100644 --- a/samples/3d-simple-map-declarative/index.html +++ b/samples/3d-simple-map-declarative/index.html @@ -11,7 +11,7 @@ + src="https://maps.googleapis.com/maps/api/js?loading=async&key=GOOGLE_MAPS_API_KEY&libraries=maps3d"> diff --git a/samples/3d-simple-map-declarative/vite.config.js b/samples/3d-simple-map-declarative/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-simple-map-declarative/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-simple-map/index.html b/samples/3d-simple-map/index.html index 10a78c795..d1bed2c68 100644 --- a/samples/3d-simple-map/index.html +++ b/samples/3d-simple-map/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-simple-map/vite.config.js b/samples/3d-simple-map/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-simple-map/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/3d-simple-marker/index.html b/samples/3d-simple-marker/index.html index 58b10d073..aaa45acb4 100644 --- a/samples/3d-simple-marker/index.html +++ b/samples/3d-simple-marker/index.html @@ -14,7 +14,7 @@ diff --git a/samples/3d-simple-marker/vite.config.js b/samples/3d-simple-marker/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/3d-simple-marker/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/add-map/index.html b/samples/add-map/index.html index e404f3437..308a37f43 100644 --- a/samples/add-map/index.html +++ b/samples/add-map/index.html @@ -14,7 +14,7 @@ diff --git a/samples/add-map/vite.config.js b/samples/add-map/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/add-map/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/address-validation/index.html b/samples/address-validation/index.html index 6b84f270e..63b2d50ab 100644 --- a/samples/address-validation/index.html +++ b/samples/address-validation/index.html @@ -14,7 +14,7 @@ diff --git a/samples/address-validation/vite.config.js b/samples/address-validation/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/address-validation/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-accessibility/index.html b/samples/advanced-markers-accessibility/index.html index 2bc919478..7d47a556d 100644 --- a/samples/advanced-markers-accessibility/index.html +++ b/samples/advanced-markers-accessibility/index.html @@ -15,7 +15,7 @@ diff --git a/samples/advanced-markers-accessibility/vite.config.js b/samples/advanced-markers-accessibility/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-accessibility/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-altitude/index.html b/samples/advanced-markers-altitude/index.html index 98f15f194..873af5e4c 100644 --- a/samples/advanced-markers-altitude/index.html +++ b/samples/advanced-markers-altitude/index.html @@ -14,7 +14,7 @@ diff --git a/samples/advanced-markers-altitude/vite.config.js b/samples/advanced-markers-altitude/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-altitude/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-animation/index.html b/samples/advanced-markers-animation/index.html index 38150f9f9..587d0ce15 100644 --- a/samples/advanced-markers-animation/index.html +++ b/samples/advanced-markers-animation/index.html @@ -14,7 +14,7 @@ diff --git a/samples/advanced-markers-animation/vite.config.js b/samples/advanced-markers-animation/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-animation/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-basic-style/index.html b/samples/advanced-markers-basic-style/index.html index 77c3be1d1..5f5eab914 100644 --- a/samples/advanced-markers-basic-style/index.html +++ b/samples/advanced-markers-basic-style/index.html @@ -14,7 +14,7 @@ diff --git a/samples/advanced-markers-basic-style/vite.config.js b/samples/advanced-markers-basic-style/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-basic-style/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-collision/index.html b/samples/advanced-markers-collision/index.html index ae1b15884..4fb9db312 100644 --- a/samples/advanced-markers-collision/index.html +++ b/samples/advanced-markers-collision/index.html @@ -22,7 +22,7 @@ diff --git a/samples/advanced-markers-collision/vite.config.js b/samples/advanced-markers-collision/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-collision/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-draggable/index.html b/samples/advanced-markers-draggable/index.html index 078611f64..95568889b 100644 --- a/samples/advanced-markers-draggable/index.html +++ b/samples/advanced-markers-draggable/index.html @@ -14,7 +14,7 @@ diff --git a/samples/advanced-markers-draggable/vite.config.js b/samples/advanced-markers-draggable/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-draggable/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-graphics/index.html b/samples/advanced-markers-graphics/index.html index c8b0a16c3..dc34b5f8d 100644 --- a/samples/advanced-markers-graphics/index.html +++ b/samples/advanced-markers-graphics/index.html @@ -13,7 +13,7 @@ diff --git a/samples/advanced-markers-graphics/vite.config.js b/samples/advanced-markers-graphics/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-graphics/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-html-simple/index.html b/samples/advanced-markers-html-simple/index.html index 1b104c75e..3e7311146 100644 --- a/samples/advanced-markers-html-simple/index.html +++ b/samples/advanced-markers-html-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/advanced-markers-html-simple/vite.config.js b/samples/advanced-markers-html-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-html-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-html/index.html b/samples/advanced-markers-html/index.html index c45f8e37e..845e9b37f 100644 --- a/samples/advanced-markers-html/index.html +++ b/samples/advanced-markers-html/index.html @@ -16,7 +16,7 @@ diff --git a/samples/advanced-markers-html/vite.config.js b/samples/advanced-markers-html/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-html/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-simple/index.html b/samples/advanced-markers-simple/index.html index 2eb922c9e..fa0ea879e 100644 --- a/samples/advanced-markers-simple/index.html +++ b/samples/advanced-markers-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/advanced-markers-simple/vite.config.js b/samples/advanced-markers-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/advanced-markers-zoom/index.html b/samples/advanced-markers-zoom/index.html index cfd4b2c85..a5a47156a 100644 --- a/samples/advanced-markers-zoom/index.html +++ b/samples/advanced-markers-zoom/index.html @@ -14,7 +14,7 @@ diff --git a/samples/advanced-markers-zoom/vite.config.js b/samples/advanced-markers-zoom/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/advanced-markers-zoom/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/ai-powered-summaries-basic/index.html b/samples/ai-powered-summaries-basic/index.html index 0cb1bbbb8..d6ce2b93f 100644 --- a/samples/ai-powered-summaries-basic/index.html +++ b/samples/ai-powered-summaries-basic/index.html @@ -14,7 +14,7 @@ diff --git a/samples/ai-powered-summaries-basic/vite.config.js b/samples/ai-powered-summaries-basic/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/ai-powered-summaries-basic/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/ai-powered-summaries/index.html b/samples/ai-powered-summaries/index.html index ce27d6bb8..e0a751294 100644 --- a/samples/ai-powered-summaries/index.html +++ b/samples/ai-powered-summaries/index.html @@ -13,7 +13,7 @@ diff --git a/samples/ai-powered-summaries/vite.config.js b/samples/ai-powered-summaries/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/ai-powered-summaries/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/boundaries-choropleth/index.html b/samples/boundaries-choropleth/index.html index 428b81d77..d1bf4fe80 100644 --- a/samples/boundaries-choropleth/index.html +++ b/samples/boundaries-choropleth/index.html @@ -14,7 +14,7 @@ diff --git a/samples/boundaries-choropleth/vite.config.js b/samples/boundaries-choropleth/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/boundaries-choropleth/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/boundaries-click/index.html b/samples/boundaries-click/index.html index d2af3aaf6..cbd05fb44 100644 --- a/samples/boundaries-click/index.html +++ b/samples/boundaries-click/index.html @@ -14,7 +14,7 @@ diff --git a/samples/boundaries-click/vite.config.js b/samples/boundaries-click/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/boundaries-click/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/boundaries-simple/index.html b/samples/boundaries-simple/index.html index 301e7d4a6..cc9d7928e 100644 --- a/samples/boundaries-simple/index.html +++ b/samples/boundaries-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/boundaries-simple/vite.config.js b/samples/boundaries-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/boundaries-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/boundaries-text-search/index.html b/samples/boundaries-text-search/index.html index 91dfd85a2..c8dda6d33 100644 --- a/samples/boundaries-text-search/index.html +++ b/samples/boundaries-text-search/index.html @@ -14,7 +14,7 @@ diff --git a/samples/boundaries-text-search/vite.config.js b/samples/boundaries-text-search/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/boundaries-text-search/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/build-single.sh b/samples/build-single.sh index be2eecfa9..0299702f4 100644 --- a/samples/build-single.sh +++ b/samples/build-single.sh @@ -196,5 +196,4 @@ set -e bash ../jsfiddle.sh "$NAME" bash ../app.sh "$NAME" bash ../docs.sh "$NAME" -npm run build:vite --workspace=. -bash ../dist.sh "$NAME" \ No newline at end of file +npm run build:vite --workspace=. \ No newline at end of file diff --git a/samples/circle-simple/index.html b/samples/circle-simple/index.html index 54628e2f8..69e88e239 100644 --- a/samples/circle-simple/index.html +++ b/samples/circle-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/circle-simple/vite.config.js b/samples/circle-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/circle-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-bounds-restriction/index.html b/samples/control-bounds-restriction/index.html index a1b985053..da2249cea 100644 --- a/samples/control-bounds-restriction/index.html +++ b/samples/control-bounds-restriction/index.html @@ -14,7 +14,7 @@ diff --git a/samples/control-bounds-restriction/vite.config.js b/samples/control-bounds-restriction/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-bounds-restriction/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-custom-state/index.html b/samples/control-custom-state/index.html index 33b55e1c8..fb4383a90 100644 --- a/samples/control-custom-state/index.html +++ b/samples/control-custom-state/index.html @@ -14,7 +14,7 @@ diff --git a/samples/control-custom-state/vite.config.js b/samples/control-custom-state/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-custom-state/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-disableUI/index.html b/samples/control-disableUI/index.html index 9a51f3dd9..781b2b5cc 100644 --- a/samples/control-disableUI/index.html +++ b/samples/control-disableUI/index.html @@ -14,7 +14,7 @@ diff --git a/samples/control-disableUI/vite.config.js b/samples/control-disableUI/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-disableUI/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-options/index.html b/samples/control-options/index.html index 0a6a1fce6..02bad2d85 100644 --- a/samples/control-options/index.html +++ b/samples/control-options/index.html @@ -14,7 +14,7 @@ diff --git a/samples/control-options/vite.config.js b/samples/control-options/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-options/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-positioning-labels/index.html b/samples/control-positioning-labels/index.html index df02076c8..a317f08f4 100644 --- a/samples/control-positioning-labels/index.html +++ b/samples/control-positioning-labels/index.html @@ -14,7 +14,7 @@ diff --git a/samples/control-positioning-labels/vite.config.js b/samples/control-positioning-labels/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-positioning-labels/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-positioning/index.html b/samples/control-positioning/index.html index 0c958e15f..87d4be78c 100644 --- a/samples/control-positioning/index.html +++ b/samples/control-positioning/index.html @@ -14,7 +14,7 @@ diff --git a/samples/control-positioning/vite.config.js b/samples/control-positioning/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-positioning/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-replacement/index.html b/samples/control-replacement/index.html index 27f05851d..41ba886c1 100644 --- a/samples/control-replacement/index.html +++ b/samples/control-replacement/index.html @@ -17,7 +17,7 @@ diff --git a/samples/control-replacement/vite.config.js b/samples/control-replacement/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-replacement/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/control-simple/index.html b/samples/control-simple/index.html index a53421d67..14d9360b9 100644 --- a/samples/control-simple/index.html +++ b/samples/control-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/control-simple/vite.config.js b/samples/control-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/control-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/dds-datasets-point/index.html b/samples/dds-datasets-point/index.html index 86307be6f..68847ce11 100644 --- a/samples/dds-datasets-point/index.html +++ b/samples/dds-datasets-point/index.html @@ -14,7 +14,7 @@ diff --git a/samples/dds-datasets-point/vite.config.js b/samples/dds-datasets-point/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/dds-datasets-point/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/dds-datasets-polygon-click/index.html b/samples/dds-datasets-polygon-click/index.html index cd2a90c59..f477c585f 100644 --- a/samples/dds-datasets-polygon-click/index.html +++ b/samples/dds-datasets-polygon-click/index.html @@ -14,7 +14,7 @@ diff --git a/samples/dds-datasets-polygon-click/vite.config.js b/samples/dds-datasets-polygon-click/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/dds-datasets-polygon-click/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/dds-datasets-polygon-colors/index.html b/samples/dds-datasets-polygon-colors/index.html index 7265da86b..d78928f9b 100644 --- a/samples/dds-datasets-polygon-colors/index.html +++ b/samples/dds-datasets-polygon-colors/index.html @@ -14,7 +14,7 @@ diff --git a/samples/dds-datasets-polygon-colors/vite.config.js b/samples/dds-datasets-polygon-colors/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/dds-datasets-polygon-colors/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/dds-datasets-polygon/index.html b/samples/dds-datasets-polygon/index.html index df972c7ae..67adb1992 100644 --- a/samples/dds-datasets-polygon/index.html +++ b/samples/dds-datasets-polygon/index.html @@ -14,7 +14,7 @@ diff --git a/samples/dds-datasets-polygon/vite.config.js b/samples/dds-datasets-polygon/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/dds-datasets-polygon/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/dds-datasets-polyline/index.html b/samples/dds-datasets-polyline/index.html index d3c8ec296..645714c6b 100644 --- a/samples/dds-datasets-polyline/index.html +++ b/samples/dds-datasets-polyline/index.html @@ -14,7 +14,7 @@ diff --git a/samples/dds-datasets-polyline/vite.config.js b/samples/dds-datasets-polyline/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/dds-datasets-polyline/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/dds-region-viewer/index.html b/samples/dds-region-viewer/index.html index 36da5a972..7fa46f52f 100644 --- a/samples/dds-region-viewer/index.html +++ b/samples/dds-region-viewer/index.html @@ -14,7 +14,7 @@ diff --git a/samples/dds-region-viewer/vite.config.js b/samples/dds-region-viewer/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/dds-region-viewer/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/deckgl-arclayer/index.html b/samples/deckgl-arclayer/index.html index 165e8d4c9..192da8ab9 100644 --- a/samples/deckgl-arclayer/index.html +++ b/samples/deckgl-arclayer/index.html @@ -14,7 +14,7 @@ diff --git a/samples/deckgl-arclayer/vite.config.js b/samples/deckgl-arclayer/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/deckgl-arclayer/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/deckgl-heatmap/index.html b/samples/deckgl-heatmap/index.html index 850bcf101..557b8e750 100644 --- a/samples/deckgl-heatmap/index.html +++ b/samples/deckgl-heatmap/index.html @@ -24,7 +24,7 @@ diff --git a/samples/deckgl-heatmap/vite.config.js b/samples/deckgl-heatmap/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/deckgl-heatmap/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/deckgl-kml-updated/index.html b/samples/deckgl-kml-updated/index.html index 937a70627..7b3838567 100644 --- a/samples/deckgl-kml-updated/index.html +++ b/samples/deckgl-kml-updated/index.html @@ -24,7 +24,7 @@ diff --git a/samples/deckgl-kml-updated/vite.config.js b/samples/deckgl-kml-updated/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/deckgl-kml-updated/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/deckgl-kml/index.html b/samples/deckgl-kml/index.html index ea0654551..895e80c2f 100644 --- a/samples/deckgl-kml/index.html +++ b/samples/deckgl-kml/index.html @@ -24,7 +24,7 @@ diff --git a/samples/deckgl-kml/vite.config.js b/samples/deckgl-kml/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/deckgl-kml/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/deckgl-points/index.html b/samples/deckgl-points/index.html index 16cd3d19e..d80d76fbc 100644 --- a/samples/deckgl-points/index.html +++ b/samples/deckgl-points/index.html @@ -13,7 +13,7 @@ diff --git a/samples/deckgl-points/vite.config.js b/samples/deckgl-points/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/deckgl-points/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/deckgl-polygon/index.html b/samples/deckgl-polygon/index.html index 21f1021e1..50981390f 100644 --- a/samples/deckgl-polygon/index.html +++ b/samples/deckgl-polygon/index.html @@ -23,7 +23,7 @@ diff --git a/samples/deckgl-polygon/vite.config.js b/samples/deckgl-polygon/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/deckgl-polygon/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/deckgl-tripslayer/index.html b/samples/deckgl-tripslayer/index.html index 761af5bb8..701e97f28 100644 --- a/samples/deckgl-tripslayer/index.html +++ b/samples/deckgl-tripslayer/index.html @@ -14,7 +14,7 @@ diff --git a/samples/deckgl-tripslayer/vite.config.js b/samples/deckgl-tripslayer/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/deckgl-tripslayer/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/dist.sh b/samples/dist.sh deleted file mode 100755 index 0c8e2b405..000000000 --- a/samples/dist.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copy/generate: -# - Vite build output for hosting - -if [ "$SKIP_DIST" = "true" ]; then - echo ">>>Skipping dist.sh (SKIP_DIST is true)" - exit 0 -fi - -echo ">>>Running dist.sh" - -NAME=$1 # The name of the folder, taken from package.json "build" line. - -# /Users/[USERNAME]/git/js-api-samples/samples - -SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" # Script directory (/samples) -PROJECT_ROOT=$(dirname "$SCRIPT_DIR") # Get the parent directory (js-api-samples) -DIST_DIR="${PROJECT_ROOT}/dist" -SAMPLE_DIR="${PROJECT_ROOT}/dist/samples/${NAME}" - -echo "PROJECT_ROOT: ${PROJECT_ROOT}" - -# Copy Vite output files to /dist/samples/${NAME}/dist -cp -r "${SCRIPT_DIR}/${NAME}/dist" "${SAMPLE_DIR}" diff --git a/samples/event-arguments/index.html b/samples/event-arguments/index.html index ce1640f1c..cac8c870d 100644 --- a/samples/event-arguments/index.html +++ b/samples/event-arguments/index.html @@ -14,7 +14,7 @@ diff --git a/samples/event-arguments/vite.config.js b/samples/event-arguments/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/event-arguments/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/event-click-latlng/index.html b/samples/event-click-latlng/index.html index 419d3510a..8dce6f216 100644 --- a/samples/event-click-latlng/index.html +++ b/samples/event-click-latlng/index.html @@ -14,7 +14,7 @@ diff --git a/samples/event-click-latlng/vite.config.js b/samples/event-click-latlng/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/event-click-latlng/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/event-closure/index.html b/samples/event-closure/index.html index 542b62119..6fe9390d2 100644 --- a/samples/event-closure/index.html +++ b/samples/event-closure/index.html @@ -14,7 +14,7 @@ diff --git a/samples/event-closure/vite.config.js b/samples/event-closure/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/event-closure/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/event-poi/index.html b/samples/event-poi/index.html index f2e13944a..dd8c5a9b4 100644 --- a/samples/event-poi/index.html +++ b/samples/event-poi/index.html @@ -14,7 +14,7 @@ diff --git a/samples/event-poi/vite.config.js b/samples/event-poi/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/event-poi/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/event-properties/index.html b/samples/event-properties/index.html index 213df2c1d..71e7b114c 100644 --- a/samples/event-properties/index.html +++ b/samples/event-properties/index.html @@ -14,7 +14,7 @@ diff --git a/samples/event-properties/vite.config.js b/samples/event-properties/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/event-properties/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/event-simple/index.html b/samples/event-simple/index.html index 6f8e97cf9..824c4a012 100644 --- a/samples/event-simple/index.html +++ b/samples/event-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/event-simple/vite.config.js b/samples/event-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/event-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/geocoding-component-restriction/index.html b/samples/geocoding-component-restriction/index.html index f2bfb4021..d79b86edc 100644 --- a/samples/geocoding-component-restriction/index.html +++ b/samples/geocoding-component-restriction/index.html @@ -14,7 +14,7 @@ diff --git a/samples/geocoding-component-restriction/vite.config.js b/samples/geocoding-component-restriction/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/geocoding-component-restriction/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/geocoding-place-id/index.html b/samples/geocoding-place-id/index.html index 7b66266e7..b93809003 100644 --- a/samples/geocoding-place-id/index.html +++ b/samples/geocoding-place-id/index.html @@ -14,7 +14,7 @@ diff --git a/samples/geocoding-place-id/vite.config.js b/samples/geocoding-place-id/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/geocoding-place-id/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/geocoding-region-es/index.html b/samples/geocoding-region-es/index.html index e096473ba..40ad10108 100644 --- a/samples/geocoding-region-es/index.html +++ b/samples/geocoding-region-es/index.html @@ -14,7 +14,7 @@ diff --git a/samples/geocoding-region-es/vite.config.js b/samples/geocoding-region-es/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/geocoding-region-es/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/geocoding-region-us/index.html b/samples/geocoding-region-us/index.html index 816bfdd90..f50c2ebd2 100644 --- a/samples/geocoding-region-us/index.html +++ b/samples/geocoding-region-us/index.html @@ -14,7 +14,7 @@ diff --git a/samples/geocoding-region-us/vite.config.js b/samples/geocoding-region-us/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/geocoding-region-us/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/geocoding-reverse/index.html b/samples/geocoding-reverse/index.html index 043b7afa3..8f9e01002 100644 --- a/samples/geocoding-reverse/index.html +++ b/samples/geocoding-reverse/index.html @@ -14,7 +14,7 @@ diff --git a/samples/geocoding-reverse/vite.config.js b/samples/geocoding-reverse/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/geocoding-reverse/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/geocoding-simple/index.html b/samples/geocoding-simple/index.html index bf88c526a..ff87bf10f 100644 --- a/samples/geocoding-simple/index.html +++ b/samples/geocoding-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/geocoding-simple/vite.config.js b/samples/geocoding-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/geocoding-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/hiding-features/index.html b/samples/hiding-features/index.html index 630abb2e3..d0ea753c5 100644 --- a/samples/hiding-features/index.html +++ b/samples/hiding-features/index.html @@ -14,7 +14,7 @@ diff --git a/samples/hiding-features/vite.config.js b/samples/hiding-features/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/hiding-features/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/infowindow-simple/index.html b/samples/infowindow-simple/index.html index 8beaa0766..0765c3961 100644 --- a/samples/infowindow-simple/index.html +++ b/samples/infowindow-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/infowindow-simple/vite.config.js b/samples/infowindow-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/infowindow-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/js-api-loader-map/index.ts b/samples/js-api-loader-map/index.ts index 7d303b86a..47319ced0 100644 --- a/samples/js-api-loader-map/index.ts +++ b/samples/js-api-loader-map/index.ts @@ -10,7 +10,7 @@ import { setOptions, importLibrary } from '@googlemaps/js-api-loader'; // [END maps_js_api_loader_map_load] -const API_KEY = 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8'; +const API_KEY = 'GOOGLE_MAPS_API_KEY'; async function init(): Promise { // [START maps_js_api_loader_map_options] diff --git a/samples/js-api-loader-map/vite.config.js b/samples/js-api-loader-map/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/js-api-loader-map/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/layer-data-event/index.html b/samples/layer-data-event/index.html index 924cdf99c..a3ac17ab4 100644 --- a/samples/layer-data-event/index.html +++ b/samples/layer-data-event/index.html @@ -14,7 +14,7 @@ diff --git a/samples/layer-data-event/vite.config.js b/samples/layer-data-event/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/layer-data-event/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/layer-data-quakes-red/index.html b/samples/layer-data-quakes-red/index.html index 7f2240b5a..05d532fb3 100644 --- a/samples/layer-data-quakes-red/index.html +++ b/samples/layer-data-quakes-red/index.html @@ -15,7 +15,7 @@ diff --git a/samples/layer-data-quakes-red/vite.config.js b/samples/layer-data-quakes-red/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/layer-data-quakes-red/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/layer-data-quakes-simple/index.html b/samples/layer-data-quakes-simple/index.html index 26d01c86f..d5254cae1 100644 --- a/samples/layer-data-quakes-simple/index.html +++ b/samples/layer-data-quakes-simple/index.html @@ -15,7 +15,7 @@ diff --git a/samples/layer-data-quakes-simple/vite.config.js b/samples/layer-data-quakes-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/layer-data-quakes-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/layer-data-simple/index.html b/samples/layer-data-simple/index.html index 943849540..08c4e481f 100644 --- a/samples/layer-data-simple/index.html +++ b/samples/layer-data-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/layer-data-simple/vite.config.js b/samples/layer-data-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/layer-data-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/layer-data-style/index.html b/samples/layer-data-style/index.html index 943cf9b70..448e7c74e 100644 --- a/samples/layer-data-style/index.html +++ b/samples/layer-data-style/index.html @@ -14,7 +14,7 @@ diff --git a/samples/layer-data-style/vite.config.js b/samples/layer-data-style/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/layer-data-style/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/map-events/index.html b/samples/map-events/index.html index da8a129bc..290a8f971 100644 --- a/samples/map-events/index.html +++ b/samples/map-events/index.html @@ -14,7 +14,7 @@ diff --git a/samples/map-events/vite.config.js b/samples/map-events/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/map-events/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/map-projection-simple/index.html b/samples/map-projection-simple/index.html index a2cc852c7..1f126dff1 100644 --- a/samples/map-projection-simple/index.html +++ b/samples/map-projection-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/map-projection-simple/vite.config.js b/samples/map-projection-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/map-projection-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/map-simple-js/index.html b/samples/map-simple-js/index.html index 3206d77a4..d2861ebf2 100644 --- a/samples/map-simple-js/index.html +++ b/samples/map-simple-js/index.html @@ -21,7 +21,7 @@ diff --git a/samples/map-simple-js/vite.config.js b/samples/map-simple-js/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/map-simple-js/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/map-simple/index.html b/samples/map-simple/index.html index 171112a1c..b4253b9dc 100644 --- a/samples/map-simple/index.html +++ b/samples/map-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/map-simple/vite.config.js b/samples/map-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/map-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-autocomplete-basic-map/index.html b/samples/place-autocomplete-basic-map/index.html index 9b022a9c6..8b6fa9b41 100644 --- a/samples/place-autocomplete-basic-map/index.html +++ b/samples/place-autocomplete-basic-map/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-autocomplete-basic-map/vite.config.js b/samples/place-autocomplete-basic-map/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-autocomplete-basic-map/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-autocomplete-data-session/index.html b/samples/place-autocomplete-data-session/index.html index 7925d662a..562fb43c8 100644 --- a/samples/place-autocomplete-data-session/index.html +++ b/samples/place-autocomplete-data-session/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-autocomplete-data-session/vite.config.js b/samples/place-autocomplete-data-session/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-autocomplete-data-session/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-autocomplete-data-simple/index.html b/samples/place-autocomplete-data-simple/index.html index d0c5db8d4..6c4ca298d 100644 --- a/samples/place-autocomplete-data-simple/index.html +++ b/samples/place-autocomplete-data-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-autocomplete-data-simple/vite.config.js b/samples/place-autocomplete-data-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-autocomplete-data-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-autocomplete-element/index.html b/samples/place-autocomplete-element/index.html index 5836b1746..6b4ad6932 100644 --- a/samples/place-autocomplete-element/index.html +++ b/samples/place-autocomplete-element/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-autocomplete-element/vite.config.js b/samples/place-autocomplete-element/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-autocomplete-element/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-autocomplete-map/index.html b/samples/place-autocomplete-map/index.html index 714460150..158b56f5a 100644 --- a/samples/place-autocomplete-map/index.html +++ b/samples/place-autocomplete-map/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-autocomplete-map/vite.config.js b/samples/place-autocomplete-map/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-autocomplete-map/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-class/index.html b/samples/place-class/index.html index d09423e3c..92fa5a9ab 100644 --- a/samples/place-class/index.html +++ b/samples/place-class/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-class/vite.config.js b/samples/place-class/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-class/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-nearby-search/index.html b/samples/place-nearby-search/index.html index 9efe25799..e32659355 100644 --- a/samples/place-nearby-search/index.html +++ b/samples/place-nearby-search/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-nearby-search/vite.config.js b/samples/place-nearby-search/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-nearby-search/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-photos/index.html b/samples/place-photos/index.html index 2fe6cef42..2861cb7b8 100644 --- a/samples/place-photos/index.html +++ b/samples/place-photos/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-photos/vite.config.js b/samples/place-photos/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-photos/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-reviews/index.html b/samples/place-reviews/index.html index 775a29f4e..5bedeb537 100644 --- a/samples/place-reviews/index.html +++ b/samples/place-reviews/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-reviews/vite.config.js b/samples/place-reviews/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-reviews/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/place-text-search/index.html b/samples/place-text-search/index.html index 0b2530b4b..f134842e0 100644 --- a/samples/place-text-search/index.html +++ b/samples/place-text-search/index.html @@ -14,7 +14,7 @@ diff --git a/samples/place-text-search/vite.config.js b/samples/place-text-search/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/place-text-search/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/places-autocomplete-addressform/index.html b/samples/places-autocomplete-addressform/index.html index 5f65bdf7d..f25ed746b 100644 --- a/samples/places-autocomplete-addressform/index.html +++ b/samples/places-autocomplete-addressform/index.html @@ -18,7 +18,7 @@ diff --git a/samples/places-autocomplete-addressform/vite.config.js b/samples/places-autocomplete-addressform/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/places-autocomplete-addressform/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/places-placeid-finder/index.html b/samples/places-placeid-finder/index.html index 8cc50f211..4690a6de7 100644 --- a/samples/places-placeid-finder/index.html +++ b/samples/places-placeid-finder/index.html @@ -14,7 +14,7 @@ diff --git a/samples/places-placeid-finder/vite.config.js b/samples/places-placeid-finder/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/places-placeid-finder/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/polyline-complex/index.html b/samples/polyline-complex/index.html index c54fc579d..906272481 100644 --- a/samples/polyline-complex/index.html +++ b/samples/polyline-complex/index.html @@ -14,7 +14,7 @@ diff --git a/samples/polyline-complex/vite.config.js b/samples/polyline-complex/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/polyline-complex/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/polyline-remove/index.html b/samples/polyline-remove/index.html index dace93ece..2f0d2106c 100644 --- a/samples/polyline-remove/index.html +++ b/samples/polyline-remove/index.html @@ -14,7 +14,7 @@ diff --git a/samples/polyline-remove/vite.config.js b/samples/polyline-remove/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/polyline-remove/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/polyline-simple/index.html b/samples/polyline-simple/index.html index c79ed17ab..4674cbb56 100644 --- a/samples/polyline-simple/index.html +++ b/samples/polyline-simple/index.html @@ -14,7 +14,7 @@ diff --git a/samples/polyline-simple/vite.config.js b/samples/polyline-simple/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/polyline-simple/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/react-ui-kit-place-details-compact/src/app.tsx b/samples/react-ui-kit-place-details-compact/src/app.tsx index e9fcc91c1..526918c91 100644 --- a/samples/react-ui-kit-place-details-compact/src/app.tsx +++ b/samples/react-ui-kit-place-details-compact/src/app.tsx @@ -12,7 +12,7 @@ import { APIProvider, useMapsLibrary } from '@vis.gl/react-google-maps'; import './styles.css'; -const API_KEY = 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8'; +const API_KEY = 'GOOGLE_MAPS_API_KEY'; interface PlaceDetailsProps { placeId: string; diff --git a/samples/react-ui-kit-place-details-compact/vite.config.js b/samples/react-ui-kit-place-details-compact/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/react-ui-kit-place-details-compact/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/react-ui-kit-place-details-latlng-compact/src/app.tsx b/samples/react-ui-kit-place-details-latlng-compact/src/app.tsx index 833aed205..4be2b8c24 100644 --- a/samples/react-ui-kit-place-details-latlng-compact/src/app.tsx +++ b/samples/react-ui-kit-place-details-latlng-compact/src/app.tsx @@ -12,7 +12,7 @@ import { APIProvider, useMapsLibrary } from '@vis.gl/react-google-maps'; import './styles.css'; -const API_KEY = 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8'; +const API_KEY = 'GOOGLE_MAPS_API_KEY'; interface PlaceDetailsProps { lat: number; diff --git a/samples/react-ui-kit-place-details-latlng-compact/vite.config.js b/samples/react-ui-kit-place-details-latlng-compact/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/react-ui-kit-place-details-latlng-compact/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/react-ui-kit-place-details-latlng/src/app.tsx b/samples/react-ui-kit-place-details-latlng/src/app.tsx index f3e0ae2ed..fc9df0349 100644 --- a/samples/react-ui-kit-place-details-latlng/src/app.tsx +++ b/samples/react-ui-kit-place-details-latlng/src/app.tsx @@ -12,7 +12,7 @@ import { APIProvider, useMapsLibrary } from '@vis.gl/react-google-maps'; import './styles.css'; -const API_KEY = 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8'; +const API_KEY = 'GOOGLE_MAPS_API_KEY'; interface PlaceDetailsProps { lat: number; diff --git a/samples/react-ui-kit-place-details-latlng/vite.config.js b/samples/react-ui-kit-place-details-latlng/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/react-ui-kit-place-details-latlng/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/react-ui-kit-place-details/src/app.tsx b/samples/react-ui-kit-place-details/src/app.tsx index db19de52c..8213269b4 100644 --- a/samples/react-ui-kit-place-details/src/app.tsx +++ b/samples/react-ui-kit-place-details/src/app.tsx @@ -12,7 +12,7 @@ import { APIProvider, useMapsLibrary } from '@vis.gl/react-google-maps'; import './styles.css'; -const API_KEY = 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8'; +const API_KEY = 'GOOGLE_MAPS_API_KEY'; interface PlaceDetailsProps { placeId: string; diff --git a/samples/react-ui-kit-place-details/vite.config.js b/samples/react-ui-kit-place-details/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/react-ui-kit-place-details/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/react-ui-kit-search-nearby/src/app.tsx b/samples/react-ui-kit-search-nearby/src/app.tsx index 1fadcbc91..fc5e30762 100644 --- a/samples/react-ui-kit-search-nearby/src/app.tsx +++ b/samples/react-ui-kit-search-nearby/src/app.tsx @@ -25,7 +25,7 @@ import { import './styles.css'; -const API_KEY = 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8'; +const API_KEY = 'GOOGLE_MAPS_API_KEY'; const App = () => ( // prettier-ignore (g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({ - key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8" + key: "GOOGLE_MAPS_API_KEY" }); diff --git a/samples/rectangle-event/vite.config.js b/samples/rectangle-event/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/rectangle-event/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/routes-compute-routes/index.html b/samples/routes-compute-routes/index.html index 6dbde0680..c9767db00 100644 --- a/samples/routes-compute-routes/index.html +++ b/samples/routes-compute-routes/index.html @@ -14,7 +14,7 @@ diff --git a/samples/routes-compute-routes/vite.config.js b/samples/routes-compute-routes/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/routes-compute-routes/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/routes-get-alternatives/index.html b/samples/routes-get-alternatives/index.html index 08b5484f8..c793e598d 100644 --- a/samples/routes-get-alternatives/index.html +++ b/samples/routes-get-alternatives/index.html @@ -14,7 +14,7 @@ diff --git a/samples/routes-get-alternatives/vite.config.js b/samples/routes-get-alternatives/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/routes-get-alternatives/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/routes-get-directions-panel/index.html b/samples/routes-get-directions-panel/index.html index ffe9362d6..e88c2c5b2 100644 --- a/samples/routes-get-directions-panel/index.html +++ b/samples/routes-get-directions-panel/index.html @@ -14,7 +14,7 @@ diff --git a/samples/routes-get-directions-panel/vite.config.js b/samples/routes-get-directions-panel/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/routes-get-directions-panel/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/routes-get-directions/index.html b/samples/routes-get-directions/index.html index 249fa1ba9..d6082dfd7 100644 --- a/samples/routes-get-directions/index.html +++ b/samples/routes-get-directions/index.html @@ -14,7 +14,7 @@ diff --git a/samples/routes-get-directions/vite.config.js b/samples/routes-get-directions/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/routes-get-directions/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/routes-markers/index.html b/samples/routes-markers/index.html index 7b2377fb7..05a261d5c 100644 --- a/samples/routes-markers/index.html +++ b/samples/routes-markers/index.html @@ -14,7 +14,7 @@ diff --git a/samples/routes-markers/vite.config.js b/samples/routes-markers/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/routes-markers/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/routes-route-matrix/index.html b/samples/routes-route-matrix/index.html index 5955ddc5a..b371a25b2 100644 --- a/samples/routes-route-matrix/index.html +++ b/samples/routes-route-matrix/index.html @@ -14,7 +14,7 @@ diff --git a/samples/routes-route-matrix/vite.config.js b/samples/routes-route-matrix/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/routes-route-matrix/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/streetview-overlays/index.html b/samples/streetview-overlays/index.html index 7e6d2d520..e3e4f8e47 100644 --- a/samples/streetview-overlays/index.html +++ b/samples/streetview-overlays/index.html @@ -14,7 +14,7 @@ diff --git a/samples/streetview-overlays/vite.config.js b/samples/streetview-overlays/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/streetview-overlays/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/test-example/index.html b/samples/test-example/index.html index 311f85713..ea3b7a8fa 100644 --- a/samples/test-example/index.html +++ b/samples/test-example/index.html @@ -16,7 +16,7 @@ diff --git a/samples/test-example/vite.config.js b/samples/test-example/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/test-example/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/ui-kit-place-details-compact/index.html b/samples/ui-kit-place-details-compact/index.html index e6ddda001..90f4c9b17 100644 --- a/samples/ui-kit-place-details-compact/index.html +++ b/samples/ui-kit-place-details-compact/index.html @@ -14,7 +14,7 @@ diff --git a/samples/ui-kit-place-details-compact/vite.config.js b/samples/ui-kit-place-details-compact/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/ui-kit-place-details-compact/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/ui-kit-place-details/index.html b/samples/ui-kit-place-details/index.html index 983179af2..360497ec8 100644 --- a/samples/ui-kit-place-details/index.html +++ b/samples/ui-kit-place-details/index.html @@ -14,7 +14,7 @@ diff --git a/samples/ui-kit-place-details/vite.config.js b/samples/ui-kit-place-details/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/ui-kit-place-details/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/ui-kit-place-search-nearby/index.html b/samples/ui-kit-place-search-nearby/index.html index 016ebe58a..0bf73e650 100644 --- a/samples/ui-kit-place-search-nearby/index.html +++ b/samples/ui-kit-place-search-nearby/index.html @@ -14,7 +14,7 @@ diff --git a/samples/ui-kit-place-search-nearby/vite.config.js b/samples/ui-kit-place-search-nearby/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/ui-kit-place-search-nearby/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/ui-kit-place-search-text/index.html b/samples/ui-kit-place-search-text/index.html index 605b60f07..6aa715b0e 100644 --- a/samples/ui-kit-place-search-text/index.html +++ b/samples/ui-kit-place-search-text/index.html @@ -14,7 +14,7 @@ diff --git a/samples/ui-kit-place-search-text/vite.config.js b/samples/ui-kit-place-search-text/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/ui-kit-place-search-text/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/weather-api-current-compact/index.html b/samples/weather-api-current-compact/index.html index 9ec60a670..eee640947 100644 --- a/samples/weather-api-current-compact/index.html +++ b/samples/weather-api-current-compact/index.html @@ -15,7 +15,7 @@ diff --git a/samples/weather-api-current-compact/index.ts b/samples/weather-api-current-compact/index.ts index acbe4793f..a2d408c53 100644 --- a/samples/weather-api-current-compact/index.ts +++ b/samples/weather-api-current-compact/index.ts @@ -11,7 +11,7 @@ import './simple-weather-widget'; // Import the custom element const CURRENT_CONDITIONS_API_URL = 'https://weather.googleapis.com/v1/currentConditions:lookup'; // Current Conditions API endpoint. -const API_KEY = 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8'; // Use the hardcoded API key from index.html +const API_KEY = 'GOOGLE_MAPS_API_KEY'; // Use the hardcoded API key from index.html const LIGHT_MAP_ID = 'c306b3c6dd3ed8d9'; const DARK_MAP_ID = '6b73a9fe7e831a00'; diff --git a/samples/weather-api-current-compact/vite.config.js b/samples/weather-api-current-compact/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/weather-api-current-compact/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/web-components-events/index.html b/samples/web-components-events/index.html index ed1bbe845..1005cc78b 100644 --- a/samples/web-components-events/index.html +++ b/samples/web-components-events/index.html @@ -14,7 +14,7 @@ diff --git a/samples/web-components-events/vite.config.js b/samples/web-components-events/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/web-components-events/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/web-components-map/index.html b/samples/web-components-map/index.html index 57b013c82..ffce96031 100644 --- a/samples/web-components-map/index.html +++ b/samples/web-components-map/index.html @@ -13,7 +13,7 @@ + src="https://maps.googleapis.com/maps/api/js?loading=async&key=GOOGLE_MAPS_API_KEY&libraries=maps,marker"> diff --git a/samples/web-components-map/vite.config.js b/samples/web-components-map/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/web-components-map/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/web-components-markers/index.html b/samples/web-components-markers/index.html index addb240fb..d0278ea63 100644 --- a/samples/web-components-markers/index.html +++ b/samples/web-components-markers/index.html @@ -22,7 +22,7 @@ + src="https://maps.googleapis.com/maps/api/js?loading=async&key=GOOGLE_MAPS_API_KEY&libraries=maps,marker"> diff --git a/samples/web-components-markers/vite.config.js b/samples/web-components-markers/vite.config.js new file mode 100644 index 000000000..6207eee82 --- /dev/null +++ b/samples/web-components-markers/vite.config.js @@ -0,0 +1 @@ +export { default } from '../../vite.config.js'; diff --git a/samples/vite.config.js b/vite.config.js similarity index 70% rename from samples/vite.config.js rename to vite.config.js index 60b152624..26e4f64e2 100644 --- a/samples/vite.config.js +++ b/vite.config.js @@ -18,11 +18,11 @@ import { defineConfig } from 'vite'; import dotenv from 'dotenv'; import { resolve, basename } from 'path'; -dotenv.config(); +dotenv.config({ path: resolve(__dirname, '.env') }); export default defineConfig(({ command }) => { - // __dirname is /Users/wfrench/git/js-api-samples/samples/ - const projectRepoRoot = resolve(__dirname, '..'); // /Users/wfrench/git/js-api-samples/ + // __dirname is /Users/[username]/git/js-api-samples/samples/ + const projectRepoRoot = resolve(__dirname); let effectiveOutDir; const effectiveBuildInput = {}; // For rollupOptions.input @@ -30,7 +30,7 @@ export default defineConfig(({ command }) => { if (command === 'build') { // When `npm run build:vite --workspace=.` is run from a sample's directory, // process.cwd() will be the path to that sample's directory. - const workspaceDir = process.cwd(); // e.g., /Users/wfrench/git/js-api-samples/samples/test-example + const workspaceDir = process.cwd(); // e.g., /Users/[username]/git/js-api-samples/samples/test-example const samplesBaseDir = resolve(projectRepoRoot, 'samples'); // Ensure we are building a specific sample within the 'samples' directory @@ -49,10 +49,7 @@ export default defineConfig(({ command }) => { 'dist' ); // Vite's `root` is projectRepoRoot, so input path is relative to that. - effectiveBuildInput[resolve(workspaceDir, 'index.html')] = resolve( - workspaceDir, - 'index.html' - ); + effectiveBuildInput['index'] = resolve(workspaceDir, 'index.html'); } else { // Fallback for builds not initiated from a specific workspace. // This shouldn't happen with your current per-sample build scripts. @@ -63,8 +60,31 @@ export default defineConfig(({ command }) => { } } + const apiKey = process.env.GOOGLE_MAPS_API_KEY; + return { - root: projectRepoRoot, // Vite's project root is js-api-samples/ + root: process.cwd(), // Always use the sample directory as the root + plugins: [ + { + name: 'html-transform', + enforce: 'pre', + transformIndexHtml(html) { + return html.replace(/GOOGLE_MAPS_API_KEY/g, apiKey); + }, + }, + { + name: 'code-transform', + enforce: 'pre', + transform(code) { + if (code.includes('GOOGLE_MAPS_API_KEY')) { + return { + code: code.replace(/GOOGLE_MAPS_API_KEY/g, apiKey), + map: null, + }; + } + }, + }, + ], build: { emptyOutDir: false, // Crucial: Do not empty the main dist dir for each sample. outDir: effectiveOutDir || resolve(projectRepoRoot, 'dist'), // Default for serve/preview @@ -79,9 +99,7 @@ export default defineConfig(({ command }) => { }, define: { - 'import.meta.env.GOOGLE_MAPS_API_KEY': JSON.stringify( - process.env.GOOGLE_MAPS_API_KEY - ), + 'import.meta.env.GOOGLE_MAPS_API_KEY': JSON.stringify(apiKey), }, }; });