create-swdg-frontend 0.1.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -13
- package/bin/index.js +3 -244
- package/lib/argv.js +43 -0
- package/lib/cli.js +141 -0
- package/lib/constants.js +24 -0
- package/lib/gis.js +92 -0
- package/lib/manifest.js +23 -0
- package/lib/prompts.js +55 -0
- package/lib/scaffold.js +118 -0
- package/package.json +6 -2
- package/scripts/sync-template.js +120 -0
- package/scripts/validate-template.mjs +74 -0
- package/stubs/tsconfig.node.json +11 -0
- package/stubs/types-env.d.ts +9 -0
- package/stubs/vite.config.ts +64 -0
- package/template/.env.example +6 -0
- package/template/.github/workflows/ci.yml +23 -0
- package/template/.github/workflows/release.yml +69 -0
- package/template/.stylelintrc.json +7 -1
- package/template/README.md +95 -32
- package/template/auto-imports.d.ts +10 -0
- package/template/docs/MAINTAINER.md +77 -0
- package/template/docs/ONBOARDING.md +284 -0
- package/template/docs/TESTING.md +104 -0
- package/template/package.json +48 -41
- package/template/pnpm-lock.yaml +6360 -0
- package/template/scripts/gen-api.cjs +20 -7
- package/template/scripts/release.mjs +22 -28
- package/template/scripts/set-release-version.mjs +46 -0
- package/template/scripts/test-pipeline.mjs +85 -0
- package/template/scripts/test-scaffold.mjs +197 -0
- package/template/scripts/test-template.mjs +52 -0
- package/template/scripts/verify.mjs +28 -0
- package/template/scripts/vite-plugin-cesium-dev.ts +56 -0
- package/template/src/api/README.md +4 -0
- package/template/src/components/Body/index.vue +65 -35
- package/template/src/components/CesiumViewer/index.vue +36 -0
- package/template/src/components/Header/index.vue +16 -5
- package/template/src/components/OnboardingDeck/index.vue +449 -0
- package/template/src/data/onboardingSlides.ts +208 -0
- package/template/src/main.ts +1 -0
- package/template/src/router/index.ts +20 -14
- package/template/src/router/routeUtils.ts +13 -0
- package/template/src/styles/shell.css +232 -0
- package/template/src/utils/axios-middleware.js +1 -1
- package/template/src/utils/cesium/index.ts +71 -0
- package/template/src/utils/composables/useFeatureGis.ts +24 -0
- package/template/src/views/examples/cesium/index.vue +85 -0
- package/template/src/views/examples/guide/index.vue +42 -0
- package/template/src/views/examples/test/index.vue +63 -0
- package/template/src/views/index.vue +2 -3
- package/template/tests/README.md +1 -0
- package/template/tests/unit/onboardingSlides.test.ts +20 -0
- package/template/tests/unit/router.utils.test.ts +21 -0
- package/template/tests/unit/scaffold.lib.test.ts +44 -0
- package/template/tests/unit/useFeatureGis.test.ts +14 -0
- package/template/tsconfig.json +17 -17
- package/template/tsconfig.node.json +1 -1
- package/template/types/env.d.ts +13 -0
- package/template/vite.config.ts +26 -5
- package/template/vitest.config.ts +13 -0
- package/template/.env +0 -1
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -438
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1012
- package/template/public/Cesium1.119/Assets/Images/bing_maps_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/cesium_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/google_earth_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/ion-credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/tilemapresource.xml +0 -14
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/airfield.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/airport.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/america-football.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/art-gallery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bakery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bank.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bar.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/baseball.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/basketball.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/beer.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bicycle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/building.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bus.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cafe.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/camera.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/campsite.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/car.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cemetery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cesium.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/chemist.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cinema.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/circle-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/circle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/city.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/clothing-store.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/college.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/commercial.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cricket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cross.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/dam.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/danger.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/disability.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/dog-park.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/embassy.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/entrance.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/farm.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fast-food.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/ferry.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fire-station.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fuel.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/garden.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/gift.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/golf.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/grocery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/hairdresser.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/harbor.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/heart.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/heliport.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/hospital.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/ice-cream.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/industrial.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/land-use.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/laundry.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/library.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/lighthouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/lodging.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/logging.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/london-underground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/marker-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/marker.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/minefield.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/mobilephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/monument.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/museum.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/music.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/oil-well.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/park.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/park2.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/parking-garage.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/parking.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/pharmacy.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/pitch.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/place-of-worship.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/playground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/police.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/polling-place.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/post.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/prison.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-above.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-light.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-metro.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-underground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-christian.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-jewish.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-muslim.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/restaurant.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/roadblock.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rocket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/school.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/scooter.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/shop.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/skiing.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/soccer.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/square-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/square.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/star-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/star.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/suitcase.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/swimming.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/telephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/tennis.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/theatre.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/toilets.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/town-hall.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/town.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/triangle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/village.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/warehouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/waste-basket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/water.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/wetland.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/zoo.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/moonSmall.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/pin.svg +0 -1
- package/template/public/Cesium1.119/Assets/Textures/waterNormals.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/template/public/Cesium1.119/Assets/approximateTerrainHeights.json +0 -10924
- package/template/public/Cesium1.119/Cesium.js +0 -185772
- package/template/public/Cesium1.119/ThirdParty/Workers/package.json +0 -3
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_deflate.min.js +0 -1681
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_inflate.min.js +0 -1489
- package/template/public/Cesium1.119/ThirdParty/Workers/z-worker-pako.js +0 -1070
- package/template/public/Cesium1.119/ThirdParty/basis_transcoder.wasm +0 -0
- package/template/public/Cesium1.119/ThirdParty/draco_decoder.wasm +0 -0
- package/template/public/Cesium1.119/ThirdParty/google-earth-dbroot-parser.js +0 -11424
- package/template/public/Cesium1.119/Widgets/Animation/Animation.css +0 -127
- package/template/public/Cesium1.119/Widgets/Animation/lighter.css +0 -78
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -112
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/lighter.css +0 -28
- package/template/public/Cesium1.119/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -104
- package/template/public/Cesium1.119/Widgets/CesiumInspector/CesiumInspector.css +0 -115
- package/template/public/Cesium1.119/Widgets/CesiumWidget/CesiumWidget.css +0 -119
- package/template/public/Cesium1.119/Widgets/CesiumWidget/lighter.css +0 -14
- package/template/public/Cesium1.119/Widgets/FullscreenButton/FullscreenButton.css +0 -8
- package/template/public/Cesium1.119/Widgets/Geocoder/Geocoder.css +0 -72
- package/template/public/Cesium1.119/Widgets/Geocoder/lighter.css +0 -17
- package/template/public/Cesium1.119/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Mouse.svg +0 -84
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Touch.svg +0 -120
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
- package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/TimelineIcons.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/info-loading.gif +0 -0
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBox.css +0 -94
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBoxDescription.css +0 -178
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -95
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/lighter.css +0 -38
- package/template/public/Cesium1.119/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
- package/template/public/Cesium1.119/Widgets/ProjectionPicker/ProjectionPicker.css +0 -46
- package/template/public/Cesium1.119/Widgets/SceneModePicker/SceneModePicker.css +0 -72
- package/template/public/Cesium1.119/Widgets/SelectionIndicator/SelectionIndicator.css +0 -22
- package/template/public/Cesium1.119/Widgets/Timeline/Timeline.css +0 -103
- package/template/public/Cesium1.119/Widgets/Timeline/lighter.css +0 -18
- package/template/public/Cesium1.119/Widgets/VRButton/VRButton.css +0 -8
- package/template/public/Cesium1.119/Widgets/Viewer/Viewer.css +0 -107
- package/template/public/Cesium1.119/Widgets/VoxelInspector/VoxelInspector.css +0 -18
- package/template/public/Cesium1.119/Widgets/lighter.css +0 -246
- package/template/public/Cesium1.119/Widgets/lighterShared.css +0 -46
- package/template/public/Cesium1.119/Widgets/shared.css +0 -103
- package/template/public/Cesium1.119/Widgets/widgets.css +0 -1376
- package/template/public/Cesium1.119/Workers/chunk-3C7WC463.js +0 -611
- package/template/public/Cesium1.119/Workers/chunk-3JW36LZF.js +0 -166
- package/template/public/Cesium1.119/Workers/chunk-4BTGX3WJ.js +0 -264
- package/template/public/Cesium1.119/Workers/chunk-4WRMLZA7.js +0 -128
- package/template/public/Cesium1.119/Workers/chunk-7Z5IIKOJ.js +0 -8046
- package/template/public/Cesium1.119/Workers/chunk-ABGXSJNX.js +0 -341
- package/template/public/Cesium1.119/Workers/chunk-AMQUWUD4.js +0 -269
- package/template/public/Cesium1.119/Workers/chunk-ATPDRNKI.js +0 -28
- package/template/public/Cesium1.119/Workers/chunk-BMHPVZ4H.js +0 -199
- package/template/public/Cesium1.119/Workers/chunk-CBEO3SHS.js +0 -1102
- package/template/public/Cesium1.119/Workers/chunk-CV7DLCWG.js +0 -485
- package/template/public/Cesium1.119/Workers/chunk-DQO6B4EQ.js +0 -76
- package/template/public/Cesium1.119/Workers/chunk-ED3TLP6D.js +0 -91
- package/template/public/Cesium1.119/Workers/chunk-EFZKO5RU.js +0 -42
- package/template/public/Cesium1.119/Workers/chunk-F5IHREXR.js +0 -2678
- package/template/public/Cesium1.119/Workers/chunk-FKRG4HDY.js +0 -516
- package/template/public/Cesium1.119/Workers/chunk-FYOYUPXG.js +0 -399
- package/template/public/Cesium1.119/Workers/chunk-GFN7NNSJ.js +0 -65
- package/template/public/Cesium1.119/Workers/chunk-HEEMUCG6.js +0 -92
- package/template/public/Cesium1.119/Workers/chunk-HSWA4OEL.js +0 -672
- package/template/public/Cesium1.119/Workers/chunk-IAC5XVZV.js +0 -287
- package/template/public/Cesium1.119/Workers/chunk-II4VNKYR.js +0 -50
- package/template/public/Cesium1.119/Workers/chunk-ILGBPNP6.js +0 -28
- package/template/public/Cesium1.119/Workers/chunk-IRH46BDL.js +0 -124
- package/template/public/Cesium1.119/Workers/chunk-IUA6FAOZ.js +0 -31
- package/template/public/Cesium1.119/Workers/chunk-K4ASOM65.js +0 -331
- package/template/public/Cesium1.119/Workers/chunk-KCIZBVXL.js +0 -258
- package/template/public/Cesium1.119/Workers/chunk-KF5NF354.js +0 -162
- package/template/public/Cesium1.119/Workers/chunk-KRKI6AAO.js +0 -773
- package/template/public/Cesium1.119/Workers/chunk-KZNJOCYU.js +0 -162
- package/template/public/Cesium1.119/Workers/chunk-O5IJ3OGP.js +0 -857
- package/template/public/Cesium1.119/Workers/chunk-OO23RBLX.js +0 -183
- package/template/public/Cesium1.119/Workers/chunk-P37AI2DW.js +0 -85
- package/template/public/Cesium1.119/Workers/chunk-PDMQLSBL.js +0 -108
- package/template/public/Cesium1.119/Workers/chunk-PEYJTJPE.js +0 -73
- package/template/public/Cesium1.119/Workers/chunk-POASMU2N.js +0 -2372
- package/template/public/Cesium1.119/Workers/chunk-PXCJYT2S.js +0 -73
- package/template/public/Cesium1.119/Workers/chunk-Q6L7X3LP.js +0 -538
- package/template/public/Cesium1.119/Workers/chunk-QB3MDM4J.js +0 -1670
- package/template/public/Cesium1.119/Workers/chunk-R6KGAEF6.js +0 -392
- package/template/public/Cesium1.119/Workers/chunk-RXTBM4OI.js +0 -57
- package/template/public/Cesium1.119/Workers/chunk-SB224QGV.js +0 -72
- package/template/public/Cesium1.119/Workers/chunk-T6BE4RZK.js +0 -37
- package/template/public/Cesium1.119/Workers/chunk-TAMCUKAR.js +0 -814
- package/template/public/Cesium1.119/Workers/chunk-TMSETF7M.js +0 -579
- package/template/public/Cesium1.119/Workers/chunk-TOGHF3VN.js +0 -376
- package/template/public/Cesium1.119/Workers/chunk-UH2WFNTA.js +0 -111
- package/template/public/Cesium1.119/Workers/chunk-V7JEDBOE.js +0 -573
- package/template/public/Cesium1.119/Workers/chunk-VBIROZR5.js +0 -633
- package/template/public/Cesium1.119/Workers/chunk-W23CU777.js +0 -271
- package/template/public/Cesium1.119/Workers/chunk-X5IHHI6X.js +0 -173
- package/template/public/Cesium1.119/Workers/chunk-XHX2UPDO.js +0 -217
- package/template/public/Cesium1.119/Workers/combineGeometry.js +0 -53
- package/template/public/Cesium1.119/Workers/createBoxGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createBoxOutlineGeometry.js +0 -189
- package/template/public/Cesium1.119/Workers/createCircleGeometry.js +0 -148
- package/template/public/Cesium1.119/Workers/createCircleOutlineGeometry.js +0 -105
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonGeometry.js +0 -293
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonOutlineGeometry.js +0 -143
- package/template/public/Cesium1.119/Workers/createCorridorGeometry.js +0 -830
- package/template/public/Cesium1.119/Workers/createCorridorOutlineGeometry.js +0 -417
- package/template/public/Cesium1.119/Workers/createCylinderGeometry.js +0 -47
- package/template/public/Cesium1.119/Workers/createCylinderOutlineGeometry.js +0 -170
- package/template/public/Cesium1.119/Workers/createEllipseGeometry.js +0 -58
- package/template/public/Cesium1.119/Workers/createEllipseOutlineGeometry.js +0 -51
- package/template/public/Cesium1.119/Workers/createEllipsoidGeometry.js +0 -46
- package/template/public/Cesium1.119/Workers/createEllipsoidOutlineGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createFrustumGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createFrustumOutlineGeometry.js +0 -164
- package/template/public/Cesium1.119/Workers/createGeometry.js +0 -159
- package/template/public/Cesium1.119/Workers/createGroundPolylineGeometry.js +0 -911
- package/template/public/Cesium1.119/Workers/createPlaneGeometry.js +0 -185
- package/template/public/Cesium1.119/Workers/createPlaneOutlineGeometry.js +0 -93
- package/template/public/Cesium1.119/Workers/createPolygonGeometry.js +0 -884
- package/template/public/Cesium1.119/Workers/createPolygonOutlineGeometry.js +0 -359
- package/template/public/Cesium1.119/Workers/createPolylineGeometry.js +0 -349
- package/template/public/Cesium1.119/Workers/createPolylineVolumeGeometry.js +0 -262
- package/template/public/Cesium1.119/Workers/createPolylineVolumeOutlineGeometry.js +0 -177
- package/template/public/Cesium1.119/Workers/createRectangleGeometry.js +0 -787
- package/template/public/Cesium1.119/Workers/createRectangleOutlineGeometry.js +0 -299
- package/template/public/Cesium1.119/Workers/createSimplePolylineGeometry.js +0 -294
- package/template/public/Cesium1.119/Workers/createSphereGeometry.js +0 -84
- package/template/public/Cesium1.119/Workers/createSphereOutlineGeometry.js +0 -83
- package/template/public/Cesium1.119/Workers/createTaskProcessorWorker.js +0 -28
- package/template/public/Cesium1.119/Workers/createVectorTileClampedPolylines.js +0 -289
- package/template/public/Cesium1.119/Workers/createVectorTileGeometries.js +0 -258
- package/template/public/Cesium1.119/Workers/createVectorTilePoints.js +0 -79
- package/template/public/Cesium1.119/Workers/createVectorTilePolygons.js +0 -275
- package/template/public/Cesium1.119/Workers/createVectorTilePolylines.js +0 -176
- package/template/public/Cesium1.119/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -375
- package/template/public/Cesium1.119/Workers/createVerticesFromHeightmap.js +0 -1772
- package/template/public/Cesium1.119/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -425
- package/template/public/Cesium1.119/Workers/createWallGeometry.js +0 -320
- package/template/public/Cesium1.119/Workers/createWallOutlineGeometry.js +0 -229
- package/template/public/Cesium1.119/Workers/decodeDraco.js +0 -227
- package/template/public/Cesium1.119/Workers/decodeGoogleEarthEnterprisePacket.js +0 -1836
- package/template/public/Cesium1.119/Workers/decodeI3S.js +0 -924
- package/template/public/Cesium1.119/Workers/transcodeKTX2.js +0 -3180
- package/template/public/Cesium1.119/Workers/transferTypedArrayTest.js +0 -34
- package/template/public/Cesium1.119/Workers/upsampleQuantizedTerrainMesh.js +0 -534
- package/template/public/Cesium1.119/index.cjs +0 -185632
- package/template/public/Cesium1.119/index.js +0 -182874
- package/template/src/views/Test/index.vue +0 -56
- package/template/tests/unit/example.test.ts +0 -7
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="shell-page guide-page">
|
|
3
|
+
<header class="example-toolbar">
|
|
4
|
+
<button
|
|
5
|
+
type="button"
|
|
6
|
+
class="shell-btn shell-btn--ghost guide-toolbar__back"
|
|
7
|
+
@click="goHome"
|
|
8
|
+
>
|
|
9
|
+
← 首页
|
|
10
|
+
</button>
|
|
11
|
+
<span class="example-toolbar__title">项目使用指南 · 幻灯片模式</span>
|
|
12
|
+
</header>
|
|
13
|
+
<OnboardingDeck fullscreen />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { useRouter } from 'vue-router';
|
|
19
|
+
import OnboardingDeck from '@components/OnboardingDeck/index.vue';
|
|
20
|
+
|
|
21
|
+
const router = useRouter();
|
|
22
|
+
|
|
23
|
+
const goHome = () => {
|
|
24
|
+
router.push('/');
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped>
|
|
29
|
+
.guide-page {
|
|
30
|
+
min-height: 100vh;
|
|
31
|
+
background: #f8fafc;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.guide-toolbar__back {
|
|
35
|
+
background: #f1f5f9;
|
|
36
|
+
color: var(--shell-text);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.guide-toolbar__back:hover {
|
|
40
|
+
background: #e2e8f0;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="shell-page">
|
|
3
|
+
<header class="example-toolbar">
|
|
4
|
+
<button type="button" class="shell-btn shell-btn--ghost" @click="goHome">
|
|
5
|
+
← 首页
|
|
6
|
+
</button>
|
|
7
|
+
<span class="example-toolbar__title">开发示例 · Store / Alert</span>
|
|
8
|
+
</header>
|
|
9
|
+
<div class="example-panel">
|
|
10
|
+
<div class="example-panel__card">
|
|
11
|
+
<span class="shell-badge">不会进入生产构建</span>
|
|
12
|
+
<h1>计数器示例</h1>
|
|
13
|
+
<p class="example-panel__counter">{{ counter.count }}</p>
|
|
14
|
+
<div class="example-panel__actions">
|
|
15
|
+
<button
|
|
16
|
+
type="button"
|
|
17
|
+
class="shell-btn shell-btn--primary"
|
|
18
|
+
@click="handleInc"
|
|
19
|
+
>
|
|
20
|
+
+1 并弹出 Alert
|
|
21
|
+
</button>
|
|
22
|
+
<button
|
|
23
|
+
type="button"
|
|
24
|
+
class="shell-btn shell-btn--ghost"
|
|
25
|
+
@click="goHome"
|
|
26
|
+
>
|
|
27
|
+
返回首页
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import { useRouter } from 'vue-router';
|
|
37
|
+
import { useAlert } from '@composables/useAlert';
|
|
38
|
+
import { useCounterStore } from '@stores/useCounter';
|
|
39
|
+
|
|
40
|
+
const router = useRouter();
|
|
41
|
+
const alert = useAlert();
|
|
42
|
+
const counter = useCounterStore();
|
|
43
|
+
|
|
44
|
+
const goHome = () => {
|
|
45
|
+
router.push('/');
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const handleInc = () => {
|
|
49
|
+
counter.inc();
|
|
50
|
+
alert(`counter: ${counter.count}`, 'info');
|
|
51
|
+
};
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style scoped>
|
|
55
|
+
.example-toolbar .shell-btn--ghost {
|
|
56
|
+
background: #f1f5f9;
|
|
57
|
+
color: var(--shell-text);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.example-toolbar .shell-btn--ghost:hover {
|
|
61
|
+
background: #e2e8f0;
|
|
62
|
+
}
|
|
63
|
+
</style>
|
package/template/tests/README.md
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { onboardingSlides } from '@/data/onboardingSlides';
|
|
3
|
+
|
|
4
|
+
describe('onboardingSlides', () => {
|
|
5
|
+
it('has unique ids and non-empty titles', () => {
|
|
6
|
+
const ids = onboardingSlides.map((s) => s.id);
|
|
7
|
+
expect(new Set(ids).size).toBe(ids.length);
|
|
8
|
+
for (const slide of onboardingSlides) {
|
|
9
|
+
expect(slide.title.length).toBeGreaterThan(0);
|
|
10
|
+
expect(slide.blocks.length).toBeGreaterThan(0);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('includes core topics for release onboarding', () => {
|
|
15
|
+
const idSet = new Set(onboardingSlides.map((s) => s.id));
|
|
16
|
+
expect(idSet.has('quickstart')).toBe(true);
|
|
17
|
+
expect(idSet.has('routes')).toBe(true);
|
|
18
|
+
expect(idSet.has('gis')).toBe(true);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { filePathToRoute, isExampleRoute } from '@/router/routeUtils';
|
|
3
|
+
|
|
4
|
+
describe('routeUtils', () => {
|
|
5
|
+
it('detects example routes', () => {
|
|
6
|
+
expect(isExampleRoute('../views/examples/test/index.vue')).toBe(true);
|
|
7
|
+
expect(isExampleRoute('../views/_examples/foo/index.vue')).toBe(true);
|
|
8
|
+
expect(isExampleRoute('../views/Dashboard/index.vue')).toBe(false);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('maps view paths to hash routes', () => {
|
|
12
|
+
expect(filePathToRoute('../views/index.vue')).toBe('');
|
|
13
|
+
expect(filePathToRoute('../views/UserList/index.vue')).toBe('/user-list');
|
|
14
|
+
expect(filePathToRoute('../views/examples/test/index.vue')).toBe(
|
|
15
|
+
'/examples/test'
|
|
16
|
+
);
|
|
17
|
+
expect(filePathToRoute('../views/system/RoleManage/index.vue')).toBe(
|
|
18
|
+
'/system/role-manage'
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
isValidPackageName,
|
|
4
|
+
parseYesNo,
|
|
5
|
+
} from '../../create-swdg/lib/prompts.js';
|
|
6
|
+
import { parseArgv } from '../../create-swdg/lib/argv.js';
|
|
7
|
+
|
|
8
|
+
describe('prompts', () => {
|
|
9
|
+
it('parseYesNo respects default', () => {
|
|
10
|
+
expect(parseYesNo('', true)).toBe(true);
|
|
11
|
+
expect(parseYesNo('', false)).toBe(false);
|
|
12
|
+
expect(parseYesNo('y', false)).toBe(true);
|
|
13
|
+
expect(parseYesNo('no', true)).toBe(false);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('validates npm package names', () => {
|
|
17
|
+
expect(isValidPackageName('my-app')).toBe(true);
|
|
18
|
+
expect(isValidPackageName('My-App')).toBe(false);
|
|
19
|
+
expect(isValidPackageName('@scope/pkg')).toBe(false);
|
|
20
|
+
expect(isValidPackageName('')).toBe(false);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
describe('parseArgv', () => {
|
|
25
|
+
it('parses project name and flags', () => {
|
|
26
|
+
const parsed = parseArgv([
|
|
27
|
+
'my-app',
|
|
28
|
+
'--no-gis',
|
|
29
|
+
'--no-install',
|
|
30
|
+
'--pm',
|
|
31
|
+
'npm',
|
|
32
|
+
]);
|
|
33
|
+
expect(parsed.targetDir).toBe('my-app');
|
|
34
|
+
expect(parsed.shouldIncludeGis).toBe(false);
|
|
35
|
+
expect(parsed.shouldInstall).toBe(false);
|
|
36
|
+
expect(parsed.pm).toBe('npm');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('parses --pm=value form', () => {
|
|
40
|
+
const parsed = parseArgv(['demo', '--pm=yarn', '--gis']);
|
|
41
|
+
expect(parsed.pm).toBe('yarn');
|
|
42
|
+
expect(parsed.shouldIncludeGis).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { resolveFeatureGis } from '@composables/useFeatureGis';
|
|
3
|
+
|
|
4
|
+
describe('resolveFeatureGis', () => {
|
|
5
|
+
it('honours explicit true/false', () => {
|
|
6
|
+
expect(resolveFeatureGis('true', false)).toBe(true);
|
|
7
|
+
expect(resolveFeatureGis('false', true)).toBe(false);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('falls back to dev mode when unset', () => {
|
|
11
|
+
expect(resolveFeatureGis(undefined, true)).toBe(true);
|
|
12
|
+
expect(resolveFeatureGis(undefined, false)).toBe(false);
|
|
13
|
+
});
|
|
14
|
+
});
|
package/template/tsconfig.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"module": "ESNext",
|
|
4
4
|
"target": "ESNext",
|
|
5
|
-
"moduleResolution": "
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
6
|
"allowSyntheticDefaultImports": true,
|
|
7
7
|
"strict": true,
|
|
8
8
|
"strictNullChecks": false,
|
|
@@ -10,22 +10,21 @@
|
|
|
10
10
|
"outDir": "./dist",
|
|
11
11
|
"rootDir": ".",
|
|
12
12
|
"composite": true,
|
|
13
|
-
"baseUrl": ".", // This must be set if you're using 'paths'
|
|
14
13
|
"paths": {
|
|
15
|
-
"@/*": ["src/*"],
|
|
16
|
-
"@assets/*": ["src/assets/*"],
|
|
17
|
-
"@style/*": ["src/styles/*"],
|
|
18
|
-
"@stores/*": ["src/stores/*"],
|
|
19
|
-
"@router/*": ["src/router/*"],
|
|
20
|
-
"@api/*": ["src/api/*"],
|
|
21
|
-
"@utils/*": ["src/utils/*"],
|
|
22
|
-
"@components/*": ["src/components/*"],
|
|
23
|
-
"@interface/*": ["interface/*"],
|
|
24
|
-
"@types/*": ["types/*"],
|
|
25
|
-
"@views/*": ["src/views/*"],
|
|
26
|
-
"@composables/*": ["src/utils/composables/*"],
|
|
27
|
-
"@directive/*": ["src/directive/*"],
|
|
28
|
-
"@layout/*": ["src/layout/*"]
|
|
14
|
+
"@/*": ["./src/*"],
|
|
15
|
+
"@assets/*": ["./src/assets/*"],
|
|
16
|
+
"@style/*": ["./src/styles/*"],
|
|
17
|
+
"@stores/*": ["./src/stores/*"],
|
|
18
|
+
"@router/*": ["./src/router/*"],
|
|
19
|
+
"@api/*": ["./src/api/*"],
|
|
20
|
+
"@utils/*": ["./src/utils/*"],
|
|
21
|
+
"@components/*": ["./src/components/*"],
|
|
22
|
+
"@interface/*": ["./interface/*"],
|
|
23
|
+
"@types/*": ["./types/*"],
|
|
24
|
+
"@views/*": ["./src/views/*"],
|
|
25
|
+
"@composables/*": ["./src/utils/composables/*"],
|
|
26
|
+
"@directive/*": ["./src/directive/*"],
|
|
27
|
+
"@layout/*": ["./src/layout/*"]
|
|
29
28
|
},
|
|
30
29
|
"types": [],
|
|
31
30
|
"isolatedModules": true,
|
|
@@ -45,7 +44,8 @@
|
|
|
45
44
|
"./src/vue-shim.d.ts",
|
|
46
45
|
"./src/**/*.vue",
|
|
47
46
|
"interface/**/*.ts",
|
|
48
|
-
"types/**/*.d.ts"
|
|
47
|
+
"types/**/*.d.ts",
|
|
48
|
+
"types/env.d.ts"
|
|
49
49
|
],
|
|
50
50
|
"exclude": ["**/node_modules/**", "**/dist/**"]
|
|
51
51
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_DEMO_PROXY_TARGET?: string;
|
|
5
|
+
/** 脚手架启用 GIS 特性时设为 true */
|
|
6
|
+
readonly VITE_FEATURE_GIS?: string;
|
|
7
|
+
/** Cesium ion access token (https://cesium.com/ion/tokens) */
|
|
8
|
+
readonly VITE_CESIUM_ION_ACCESS_TOKEN?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface ImportMeta {
|
|
12
|
+
readonly env: ImportMetaEnv;
|
|
13
|
+
}
|
package/template/vite.config.ts
CHANGED
|
@@ -2,15 +2,26 @@ import { defineConfig, loadEnv } from 'vite';
|
|
|
2
2
|
import vue from '@vitejs/plugin-vue';
|
|
3
3
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
4
4
|
import Components from 'unplugin-vue-components/vite';
|
|
5
|
+
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
5
6
|
import copyPlugin from 'rollup-plugin-copy';
|
|
6
7
|
import path from 'path';
|
|
7
|
-
import
|
|
8
|
+
import { cesiumDevAssets } from './scripts/vite-plugin-cesium-dev';
|
|
9
|
+
|
|
10
|
+
const cesiumSource = 'node_modules/cesium/Build/Cesium';
|
|
11
|
+
/** 与 define.CESIUM_BASE_URL 一致,构建产物位于 dist/cesium/ */
|
|
12
|
+
const cesiumBaseUrl = 'cesium';
|
|
8
13
|
|
|
9
14
|
export default defineConfig(({ mode }) => {
|
|
10
15
|
const env = loadEnv(mode, process.cwd(), '');
|
|
16
|
+
const isDev = mode === 'development';
|
|
17
|
+
// 开发:绝对路径 + 中间件挂载;生产:相对路径配合 base: './'
|
|
18
|
+
const cesiumBase = isDev ? `/${cesiumBaseUrl}/` : `./${cesiumBaseUrl}/`;
|
|
11
19
|
|
|
12
20
|
return {
|
|
13
21
|
base: './',
|
|
22
|
+
define: {
|
|
23
|
+
CESIUM_BASE_URL: JSON.stringify(cesiumBase),
|
|
24
|
+
},
|
|
14
25
|
build: {
|
|
15
26
|
sourcemap: true,
|
|
16
27
|
emptyOutDir: false,
|
|
@@ -24,7 +35,20 @@ export default defineConfig(({ mode }) => {
|
|
|
24
35
|
outDir: 'dist',
|
|
25
36
|
assetsDir: 'assets',
|
|
26
37
|
},
|
|
27
|
-
plugins: [
|
|
38
|
+
plugins: [
|
|
39
|
+
vue(),
|
|
40
|
+
isDev ? cesiumDevAssets(`/${cesiumBaseUrl}`) : null,
|
|
41
|
+
viteStaticCopy({
|
|
42
|
+
targets: [
|
|
43
|
+
{ src: `${cesiumSource}/ThirdParty`, dest: cesiumBaseUrl },
|
|
44
|
+
{ src: `${cesiumSource}/Workers`, dest: cesiumBaseUrl },
|
|
45
|
+
{ src: `${cesiumSource}/Assets`, dest: cesiumBaseUrl },
|
|
46
|
+
{ src: `${cesiumSource}/Widgets`, dest: cesiumBaseUrl },
|
|
47
|
+
],
|
|
48
|
+
}),
|
|
49
|
+
AutoImport({}),
|
|
50
|
+
Components({}),
|
|
51
|
+
].filter(Boolean),
|
|
28
52
|
resolve: {
|
|
29
53
|
alias: {
|
|
30
54
|
'@': path.resolve(__dirname, './src'),
|
|
@@ -49,9 +73,6 @@ export default defineConfig(({ mode }) => {
|
|
|
49
73
|
javascriptEnabled: true,
|
|
50
74
|
},
|
|
51
75
|
},
|
|
52
|
-
postcss: {
|
|
53
|
-
plugins: [autoprefixer()],
|
|
54
|
-
},
|
|
55
76
|
},
|
|
56
77
|
server: {
|
|
57
78
|
host: '0.0.0.0',
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
import vue from '@vitejs/plugin-vue';
|
|
2
|
+
import path from 'node:path';
|
|
1
3
|
import { defineConfig } from 'vitest/config';
|
|
2
4
|
|
|
3
5
|
export default defineConfig({
|
|
6
|
+
plugins: [vue()],
|
|
7
|
+
resolve: {
|
|
8
|
+
alias: {
|
|
9
|
+
'@': path.resolve(__dirname, './src'),
|
|
10
|
+
'@composables': path.resolve(__dirname, './src/utils/composables'),
|
|
11
|
+
'@stores': path.resolve(__dirname, './src/stores'),
|
|
12
|
+
'@components': path.resolve(__dirname, './src/components'),
|
|
13
|
+
'@utils': path.resolve(__dirname, './src/utils'),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
4
16
|
test: {
|
|
5
17
|
globals: true,
|
|
6
18
|
environment: 'jsdom',
|
|
7
19
|
setupFiles: ['./tests/setup.ts'],
|
|
20
|
+
include: ['tests/unit/**/*.test.ts'],
|
|
8
21
|
},
|
|
9
22
|
});
|
package/template/.env
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VITE_DEMO_PROXY_TARGET=http://127.0.0.1:8888
|