create-swdg-frontend 0.1.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 +39 -0
- package/bin/index.js +248 -0
- package/package.json +29 -0
- package/template/.husky/commit-msg +42 -0
- package/template/.husky/pre-commit +2 -0
- package/template/.husky/prepare-commit-msg +1 -0
- package/template/.lintstagedrc +5 -0
- package/template/.prettierignore +26 -0
- package/template/.prettierrc.cjs +10 -0
- package/template/.stylelintignore +1 -0
- package/template/.stylelintrc.json +6 -0
- package/template/README.md +36 -0
- package/template/commitlint.config.cjs +64 -0
- package/template/eslint.config.js +96 -0
- package/template/index.html +17 -0
- package/template/interface/user.ts +5 -0
- package/template/package.json +84 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_27.json +438 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1012 -0
- 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 +14 -0
- 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 +1 -0
- 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 +10924 -0
- package/template/public/Cesium1.119/Cesium.js +185772 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/package.json +3 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_deflate.min.js +1681 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_inflate.min.js +1489 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/z-worker-pako.js +1070 -0
- 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 +11424 -0
- package/template/public/Cesium1.119/Widgets/Animation/Animation.css +127 -0
- package/template/public/Cesium1.119/Widgets/Animation/lighter.css +78 -0
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/BaseLayerPicker.css +112 -0
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/lighter.css +28 -0
- package/template/public/Cesium1.119/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +104 -0
- package/template/public/Cesium1.119/Widgets/CesiumInspector/CesiumInspector.css +115 -0
- package/template/public/Cesium1.119/Widgets/CesiumWidget/CesiumWidget.css +119 -0
- package/template/public/Cesium1.119/Widgets/CesiumWidget/lighter.css +14 -0
- package/template/public/Cesium1.119/Widgets/FullscreenButton/FullscreenButton.css +8 -0
- package/template/public/Cesium1.119/Widgets/Geocoder/Geocoder.css +72 -0
- package/template/public/Cesium1.119/Widgets/Geocoder/lighter.css +17 -0
- package/template/public/Cesium1.119/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- 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 +84 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Touch.svg +120 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
- 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 +94 -0
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBoxDescription.css +178 -0
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/NavigationHelpButton.css +95 -0
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/lighter.css +38 -0
- package/template/public/Cesium1.119/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
- package/template/public/Cesium1.119/Widgets/ProjectionPicker/ProjectionPicker.css +46 -0
- package/template/public/Cesium1.119/Widgets/SceneModePicker/SceneModePicker.css +72 -0
- package/template/public/Cesium1.119/Widgets/SelectionIndicator/SelectionIndicator.css +22 -0
- package/template/public/Cesium1.119/Widgets/Timeline/Timeline.css +103 -0
- package/template/public/Cesium1.119/Widgets/Timeline/lighter.css +18 -0
- package/template/public/Cesium1.119/Widgets/VRButton/VRButton.css +8 -0
- package/template/public/Cesium1.119/Widgets/Viewer/Viewer.css +107 -0
- package/template/public/Cesium1.119/Widgets/VoxelInspector/VoxelInspector.css +18 -0
- package/template/public/Cesium1.119/Widgets/lighter.css +246 -0
- package/template/public/Cesium1.119/Widgets/lighterShared.css +46 -0
- package/template/public/Cesium1.119/Widgets/shared.css +103 -0
- package/template/public/Cesium1.119/Widgets/widgets.css +1376 -0
- package/template/public/Cesium1.119/Workers/chunk-3C7WC463.js +611 -0
- package/template/public/Cesium1.119/Workers/chunk-3JW36LZF.js +166 -0
- package/template/public/Cesium1.119/Workers/chunk-4BTGX3WJ.js +264 -0
- package/template/public/Cesium1.119/Workers/chunk-4WRMLZA7.js +128 -0
- package/template/public/Cesium1.119/Workers/chunk-7Z5IIKOJ.js +8046 -0
- package/template/public/Cesium1.119/Workers/chunk-ABGXSJNX.js +341 -0
- package/template/public/Cesium1.119/Workers/chunk-AMQUWUD4.js +269 -0
- package/template/public/Cesium1.119/Workers/chunk-ATPDRNKI.js +28 -0
- package/template/public/Cesium1.119/Workers/chunk-BMHPVZ4H.js +199 -0
- package/template/public/Cesium1.119/Workers/chunk-CBEO3SHS.js +1102 -0
- package/template/public/Cesium1.119/Workers/chunk-CV7DLCWG.js +485 -0
- package/template/public/Cesium1.119/Workers/chunk-DQO6B4EQ.js +76 -0
- package/template/public/Cesium1.119/Workers/chunk-ED3TLP6D.js +91 -0
- package/template/public/Cesium1.119/Workers/chunk-EFZKO5RU.js +42 -0
- package/template/public/Cesium1.119/Workers/chunk-F5IHREXR.js +2678 -0
- package/template/public/Cesium1.119/Workers/chunk-FKRG4HDY.js +516 -0
- package/template/public/Cesium1.119/Workers/chunk-FYOYUPXG.js +399 -0
- package/template/public/Cesium1.119/Workers/chunk-GFN7NNSJ.js +65 -0
- package/template/public/Cesium1.119/Workers/chunk-HEEMUCG6.js +92 -0
- package/template/public/Cesium1.119/Workers/chunk-HSWA4OEL.js +672 -0
- package/template/public/Cesium1.119/Workers/chunk-IAC5XVZV.js +287 -0
- package/template/public/Cesium1.119/Workers/chunk-II4VNKYR.js +50 -0
- package/template/public/Cesium1.119/Workers/chunk-ILGBPNP6.js +28 -0
- package/template/public/Cesium1.119/Workers/chunk-IRH46BDL.js +124 -0
- package/template/public/Cesium1.119/Workers/chunk-IUA6FAOZ.js +31 -0
- package/template/public/Cesium1.119/Workers/chunk-K4ASOM65.js +331 -0
- package/template/public/Cesium1.119/Workers/chunk-KCIZBVXL.js +258 -0
- package/template/public/Cesium1.119/Workers/chunk-KF5NF354.js +162 -0
- package/template/public/Cesium1.119/Workers/chunk-KRKI6AAO.js +773 -0
- package/template/public/Cesium1.119/Workers/chunk-KZNJOCYU.js +162 -0
- package/template/public/Cesium1.119/Workers/chunk-O5IJ3OGP.js +857 -0
- package/template/public/Cesium1.119/Workers/chunk-OO23RBLX.js +183 -0
- package/template/public/Cesium1.119/Workers/chunk-P37AI2DW.js +85 -0
- package/template/public/Cesium1.119/Workers/chunk-PDMQLSBL.js +108 -0
- package/template/public/Cesium1.119/Workers/chunk-PEYJTJPE.js +73 -0
- package/template/public/Cesium1.119/Workers/chunk-POASMU2N.js +2372 -0
- package/template/public/Cesium1.119/Workers/chunk-PXCJYT2S.js +73 -0
- package/template/public/Cesium1.119/Workers/chunk-Q6L7X3LP.js +538 -0
- package/template/public/Cesium1.119/Workers/chunk-QB3MDM4J.js +1670 -0
- package/template/public/Cesium1.119/Workers/chunk-R6KGAEF6.js +392 -0
- package/template/public/Cesium1.119/Workers/chunk-RXTBM4OI.js +57 -0
- package/template/public/Cesium1.119/Workers/chunk-SB224QGV.js +72 -0
- package/template/public/Cesium1.119/Workers/chunk-T6BE4RZK.js +37 -0
- package/template/public/Cesium1.119/Workers/chunk-TAMCUKAR.js +814 -0
- package/template/public/Cesium1.119/Workers/chunk-TMSETF7M.js +579 -0
- package/template/public/Cesium1.119/Workers/chunk-TOGHF3VN.js +376 -0
- package/template/public/Cesium1.119/Workers/chunk-UH2WFNTA.js +111 -0
- package/template/public/Cesium1.119/Workers/chunk-V7JEDBOE.js +573 -0
- package/template/public/Cesium1.119/Workers/chunk-VBIROZR5.js +633 -0
- package/template/public/Cesium1.119/Workers/chunk-W23CU777.js +271 -0
- package/template/public/Cesium1.119/Workers/chunk-X5IHHI6X.js +173 -0
- package/template/public/Cesium1.119/Workers/chunk-XHX2UPDO.js +217 -0
- package/template/public/Cesium1.119/Workers/combineGeometry.js +53 -0
- package/template/public/Cesium1.119/Workers/createBoxGeometry.js +45 -0
- package/template/public/Cesium1.119/Workers/createBoxOutlineGeometry.js +189 -0
- package/template/public/Cesium1.119/Workers/createCircleGeometry.js +148 -0
- package/template/public/Cesium1.119/Workers/createCircleOutlineGeometry.js +105 -0
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonGeometry.js +293 -0
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonOutlineGeometry.js +143 -0
- package/template/public/Cesium1.119/Workers/createCorridorGeometry.js +830 -0
- package/template/public/Cesium1.119/Workers/createCorridorOutlineGeometry.js +417 -0
- package/template/public/Cesium1.119/Workers/createCylinderGeometry.js +47 -0
- package/template/public/Cesium1.119/Workers/createCylinderOutlineGeometry.js +170 -0
- package/template/public/Cesium1.119/Workers/createEllipseGeometry.js +58 -0
- package/template/public/Cesium1.119/Workers/createEllipseOutlineGeometry.js +51 -0
- package/template/public/Cesium1.119/Workers/createEllipsoidGeometry.js +46 -0
- package/template/public/Cesium1.119/Workers/createEllipsoidOutlineGeometry.js +45 -0
- package/template/public/Cesium1.119/Workers/createFrustumGeometry.js +45 -0
- package/template/public/Cesium1.119/Workers/createFrustumOutlineGeometry.js +164 -0
- package/template/public/Cesium1.119/Workers/createGeometry.js +159 -0
- package/template/public/Cesium1.119/Workers/createGroundPolylineGeometry.js +911 -0
- package/template/public/Cesium1.119/Workers/createPlaneGeometry.js +185 -0
- package/template/public/Cesium1.119/Workers/createPlaneOutlineGeometry.js +93 -0
- package/template/public/Cesium1.119/Workers/createPolygonGeometry.js +884 -0
- package/template/public/Cesium1.119/Workers/createPolygonOutlineGeometry.js +359 -0
- package/template/public/Cesium1.119/Workers/createPolylineGeometry.js +349 -0
- package/template/public/Cesium1.119/Workers/createPolylineVolumeGeometry.js +262 -0
- package/template/public/Cesium1.119/Workers/createPolylineVolumeOutlineGeometry.js +177 -0
- package/template/public/Cesium1.119/Workers/createRectangleGeometry.js +787 -0
- package/template/public/Cesium1.119/Workers/createRectangleOutlineGeometry.js +299 -0
- package/template/public/Cesium1.119/Workers/createSimplePolylineGeometry.js +294 -0
- package/template/public/Cesium1.119/Workers/createSphereGeometry.js +84 -0
- package/template/public/Cesium1.119/Workers/createSphereOutlineGeometry.js +83 -0
- package/template/public/Cesium1.119/Workers/createTaskProcessorWorker.js +28 -0
- package/template/public/Cesium1.119/Workers/createVectorTileClampedPolylines.js +289 -0
- package/template/public/Cesium1.119/Workers/createVectorTileGeometries.js +258 -0
- package/template/public/Cesium1.119/Workers/createVectorTilePoints.js +79 -0
- package/template/public/Cesium1.119/Workers/createVectorTilePolygons.js +275 -0
- package/template/public/Cesium1.119/Workers/createVectorTilePolylines.js +176 -0
- package/template/public/Cesium1.119/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +375 -0
- package/template/public/Cesium1.119/Workers/createVerticesFromHeightmap.js +1772 -0
- package/template/public/Cesium1.119/Workers/createVerticesFromQuantizedTerrainMesh.js +425 -0
- package/template/public/Cesium1.119/Workers/createWallGeometry.js +320 -0
- package/template/public/Cesium1.119/Workers/createWallOutlineGeometry.js +229 -0
- package/template/public/Cesium1.119/Workers/decodeDraco.js +227 -0
- package/template/public/Cesium1.119/Workers/decodeGoogleEarthEnterprisePacket.js +1836 -0
- package/template/public/Cesium1.119/Workers/decodeI3S.js +924 -0
- package/template/public/Cesium1.119/Workers/transcodeKTX2.js +3180 -0
- package/template/public/Cesium1.119/Workers/transferTypedArrayTest.js +34 -0
- package/template/public/Cesium1.119/Workers/upsampleQuantizedTerrainMesh.js +534 -0
- package/template/public/Cesium1.119/index.cjs +185632 -0
- package/template/public/Cesium1.119/index.js +182874 -0
- package/template/public/vite.svg +1 -0
- package/template/scripts/gen-api.cjs +178 -0
- package/template/src/App.vue +6 -0
- package/template/src/api/README.md +3 -0
- package/template/src/assets/favicon.svg +49 -0
- package/template/src/components/Body/index.vue +16 -0
- package/template/src/components/Header/index.vue +8 -0
- package/template/src/directive/focus.ts +9 -0
- package/template/src/layout/BasicLayout.vue +28 -0
- package/template/src/main.ts +33 -0
- package/template/src/router/index.ts +24 -0
- package/template/src/stores/README.md +3 -0
- package/template/src/stores/useCounter.ts +12 -0
- package/template/src/styles/alerts.less +85 -0
- package/template/src/styles/global.css +326 -0
- package/template/src/utils/alert.ts +58 -0
- package/template/src/utils/components.ts +21 -0
- package/template/src/utils/composables/useAlert.ts +14 -0
- package/template/src/views/Test/index.vue +23 -0
- package/template/src/views/index.vue +9 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/swdg/bin/index.js +23 -0
- package/template/swdg/package.json +27 -0
- package/template/tests/README.md +6 -0
- package/template/tests/e2e/README.md +3 -0
- package/template/tests/setup.ts +1 -0
- package/template/tests/unit/example.test.ts +7 -0
- package/template/tests/utils/helpers.ts +1 -0
- package/template/tsconfig.json +51 -0
- package/template/tsconfig.node.json +11 -0
- package/template/types/README.md +3 -0
- package/template/types/global.d.ts +9 -0
- package/template/vite.config.ts +75 -0
- package/template/vitest.config.ts +9 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# create-swdg
|
|
2
|
+
|
|
3
|
+
Scaffold a new project from the SWDG frontend template.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm create swdg my-app
|
|
9
|
+
# or
|
|
10
|
+
pnpm dlx create-swdg my-app
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Options:
|
|
14
|
+
|
|
15
|
+
- `--install` to install dependencies after creation
|
|
16
|
+
- `--no-install` to skip installing dependencies
|
|
17
|
+
- `--pm pnpm|npm|yarn` to choose the package manager (default: pnpm)
|
|
18
|
+
- `--git` to run `git init`
|
|
19
|
+
- `--no-git` to skip `git init`
|
|
20
|
+
- `--gis` to include Cesium GIS assets
|
|
21
|
+
- `--no-gis` to exclude Cesium GIS assets
|
|
22
|
+
|
|
23
|
+
## Sync template
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm run sync-template
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
You can override the template repo and branch:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
TEMPLATE_REPO=http://10.20.124.70/bim/frontend-framework.git TEMPLATE_BRANCH=main pnpm run sync-template
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You can also sync from a local template directory:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
TEMPLATE_DIR="/Users/inupedia/Side Projects/frontend-framework" pnpm run sync-template
|
|
39
|
+
```
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { spawn } from 'node:child_process';
|
|
6
|
+
import readline from 'node:readline/promises';
|
|
7
|
+
|
|
8
|
+
const argv = process.argv.slice(2);
|
|
9
|
+
|
|
10
|
+
let pm = 'pnpm';
|
|
11
|
+
let targetDir;
|
|
12
|
+
let shouldInstall;
|
|
13
|
+
let shouldInitGit;
|
|
14
|
+
let shouldIncludeGis;
|
|
15
|
+
const flags = new Set();
|
|
16
|
+
|
|
17
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
18
|
+
const arg = argv[i];
|
|
19
|
+
if (arg === '--pm') {
|
|
20
|
+
pm = argv[i + 1] ?? pm;
|
|
21
|
+
i += 1;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (arg.startsWith('--pm=')) {
|
|
25
|
+
pm = arg.slice('--pm='.length) || pm;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (arg === '--install') {
|
|
29
|
+
shouldInstall = true;
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (arg === '--no-install') {
|
|
33
|
+
shouldInstall = false;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (arg === '--git') {
|
|
37
|
+
shouldInitGit = true;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (arg === '--no-git') {
|
|
41
|
+
shouldInitGit = false;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (arg === '--gis') {
|
|
45
|
+
shouldIncludeGis = true;
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (arg === '--no-gis') {
|
|
49
|
+
shouldIncludeGis = false;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (arg.startsWith('-')) {
|
|
53
|
+
flags.add(arg);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (!targetDir) targetDir = arg;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (flags.has('--help') || flags.has('-h')) {
|
|
60
|
+
console.log(
|
|
61
|
+
`\nUsage: pnpm create swdg [project-name] [--install|--no-install] [--git|--no-git] [--gis|--no-gis] [--pm pnpm|npm|yarn]\n`
|
|
62
|
+
);
|
|
63
|
+
process.exit(0);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
67
|
+
const __dirname = path.dirname(__filename);
|
|
68
|
+
const templateDir = path.resolve(__dirname, '../template');
|
|
69
|
+
let destDir;
|
|
70
|
+
|
|
71
|
+
function isValidPackageName(name) {
|
|
72
|
+
if (!name) return false;
|
|
73
|
+
if (name.startsWith('@')) return false;
|
|
74
|
+
if (name.length > 214) return false;
|
|
75
|
+
return /^[a-z0-9][a-z0-9._-]*$/.test(name);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async function resolveTargetDir() {
|
|
79
|
+
if (targetDir) {
|
|
80
|
+
if (!isValidPackageName(targetDir)) {
|
|
81
|
+
console.error(
|
|
82
|
+
'Invalid project name. Use lowercase letters, numbers, dots, dashes or underscores.'
|
|
83
|
+
);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
return targetDir;
|
|
87
|
+
}
|
|
88
|
+
const rl = readline.createInterface({
|
|
89
|
+
input: process.stdin,
|
|
90
|
+
output: process.stdout,
|
|
91
|
+
});
|
|
92
|
+
let name = '';
|
|
93
|
+
while (!isValidPackageName(name)) {
|
|
94
|
+
const answer = await rl.question('Project name (my-app): ');
|
|
95
|
+
name = answer.trim() || 'my-app';
|
|
96
|
+
if (!isValidPackageName(name)) {
|
|
97
|
+
console.log(
|
|
98
|
+
'Invalid project name. Use lowercase letters, numbers, dots, dashes or underscores.'
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
rl.close();
|
|
103
|
+
return name;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function resolveGisChoice() {
|
|
107
|
+
if (shouldIncludeGis === true) return true;
|
|
108
|
+
if (shouldIncludeGis === false) return false;
|
|
109
|
+
const rl = readline.createInterface({
|
|
110
|
+
input: process.stdin,
|
|
111
|
+
output: process.stdout,
|
|
112
|
+
});
|
|
113
|
+
const answer = await rl.question('Include GIS (Cesium) assets? (Y/n): ');
|
|
114
|
+
rl.close();
|
|
115
|
+
if (!answer.trim()) return true;
|
|
116
|
+
return /^y(es)?$/i.test(answer.trim());
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async function pathExists(p) {
|
|
120
|
+
try {
|
|
121
|
+
await fs.access(p);
|
|
122
|
+
return true;
|
|
123
|
+
} catch {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async function isDirEmpty(p) {
|
|
129
|
+
try {
|
|
130
|
+
const entries = await fs.readdir(p);
|
|
131
|
+
return entries.length === 0;
|
|
132
|
+
} catch {
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async function copyTemplate() {
|
|
138
|
+
if (await pathExists(destDir)) {
|
|
139
|
+
const empty = await isDirEmpty(destDir);
|
|
140
|
+
if (!empty) {
|
|
141
|
+
const rl = readline.createInterface({
|
|
142
|
+
input: process.stdin,
|
|
143
|
+
output: process.stdout,
|
|
144
|
+
});
|
|
145
|
+
const answer = await rl.question(
|
|
146
|
+
`Target directory is not empty. Remove and continue? (y/N): `
|
|
147
|
+
);
|
|
148
|
+
rl.close();
|
|
149
|
+
if (!/^y(es)?$/i.test(answer.trim())) {
|
|
150
|
+
console.error('Aborted.');
|
|
151
|
+
process.exit(1);
|
|
152
|
+
}
|
|
153
|
+
await fs.rm(destDir, { recursive: true, force: true });
|
|
154
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
155
|
+
}
|
|
156
|
+
} else {
|
|
157
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
await fs.cp(templateDir, destDir, { recursive: true });
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
async function updatePackageName() {
|
|
164
|
+
const pkgPath = path.join(destDir, 'package.json');
|
|
165
|
+
const raw = await fs.readFile(pkgPath, 'utf8');
|
|
166
|
+
const pkg = JSON.parse(raw);
|
|
167
|
+
pkg.name = path.basename(destDir);
|
|
168
|
+
await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2) + '\n', 'utf8');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
async function updateIndexTitle() {
|
|
172
|
+
const indexPath = path.join(destDir, 'index.html');
|
|
173
|
+
try {
|
|
174
|
+
const html = await fs.readFile(indexPath, 'utf8');
|
|
175
|
+
const title = path.basename(destDir);
|
|
176
|
+
const next = html.replace(
|
|
177
|
+
/<title>.*?<\/title>/i,
|
|
178
|
+
`<title>${title}</title>`
|
|
179
|
+
);
|
|
180
|
+
await fs.writeFile(indexPath, next, 'utf8');
|
|
181
|
+
} catch {
|
|
182
|
+
// Ignore if index.html does not exist
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async function removeGisAssets() {
|
|
187
|
+
const gisDir = path.join(destDir, 'public', 'Cesium1.119');
|
|
188
|
+
await fs.rm(gisDir, { recursive: true, force: true });
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
async function runInstall() {
|
|
192
|
+
const cmd = pm || 'pnpm';
|
|
193
|
+
const child = spawn(cmd, ['install'], {
|
|
194
|
+
cwd: destDir,
|
|
195
|
+
stdio: 'inherit',
|
|
196
|
+
});
|
|
197
|
+
await new Promise((resolve, reject) => {
|
|
198
|
+
child.on('exit', (code) => {
|
|
199
|
+
if (code === 0) resolve();
|
|
200
|
+
else reject(new Error(`${cmd} install failed with code ${code}`));
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
async function initGit() {
|
|
206
|
+
await new Promise((resolve, reject) => {
|
|
207
|
+
const child = spawn('git', ['init'], {
|
|
208
|
+
cwd: destDir,
|
|
209
|
+
stdio: 'inherit',
|
|
210
|
+
});
|
|
211
|
+
child.on('exit', (code) => {
|
|
212
|
+
if (code === 0) resolve();
|
|
213
|
+
else reject(new Error(`git init failed with code ${code}`));
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
try {
|
|
219
|
+
targetDir = await resolveTargetDir();
|
|
220
|
+
destDir = path.resolve(process.cwd(), targetDir);
|
|
221
|
+
await copyTemplate();
|
|
222
|
+
await updatePackageName();
|
|
223
|
+
await updateIndexTitle();
|
|
224
|
+
|
|
225
|
+
const includeGis = await resolveGisChoice();
|
|
226
|
+
if (!includeGis) {
|
|
227
|
+
await removeGisAssets();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (shouldInitGit === true) {
|
|
231
|
+
await initGit();
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (
|
|
235
|
+
shouldInstall === true ||
|
|
236
|
+
(shouldInstall !== false && flags.has('--install'))
|
|
237
|
+
) {
|
|
238
|
+
await runInstall();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
console.log(`\nProject created at ${destDir}`);
|
|
242
|
+
console.log(
|
|
243
|
+
`\nNext steps:\n cd ${targetDir}\n ${pm} install\n ${pm} run dev\n`
|
|
244
|
+
);
|
|
245
|
+
} catch (err) {
|
|
246
|
+
console.error(err?.message ?? err);
|
|
247
|
+
process.exit(1);
|
|
248
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-swdg-frontend",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Scaffold a new SWDG frontend project",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-swdg": "bin/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"template"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"sync-template": "node scripts/sync-template.js",
|
|
15
|
+
"prepublishOnly": "node scripts/sync-template.js"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"pnpm",
|
|
22
|
+
"create",
|
|
23
|
+
"scaffold",
|
|
24
|
+
"vite",
|
|
25
|
+
"vue"
|
|
26
|
+
],
|
|
27
|
+
"author": "inupedia",
|
|
28
|
+
"license": "MIT"
|
|
29
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
npx commitlint --edit "$1" || (
|
|
2
|
+
echo ""
|
|
3
|
+
echo "提交格式:"
|
|
4
|
+
echo " <type>[scope]: <subject>"
|
|
5
|
+
echo " type 和 subject 必填,scope 可选。"
|
|
6
|
+
echo ""
|
|
7
|
+
echo "详细说明:"
|
|
8
|
+
echo "1. type(提交类型):"
|
|
9
|
+
echo " 描述提交的目的,必须是以下之一:"
|
|
10
|
+
echo " - feat 新功能开发"
|
|
11
|
+
echo " - fix 问题修复"
|
|
12
|
+
echo " - update 更新现有功能"
|
|
13
|
+
echo " - docs 文档调整"
|
|
14
|
+
echo " - style 代码格式调整(不影响功能)"
|
|
15
|
+
echo " - refactor 代码重构(非功能变更)"
|
|
16
|
+
echo " - perf 性能优化"
|
|
17
|
+
echo " - test 添加或修改测试代码"
|
|
18
|
+
echo " - chore 构建工具或依赖的变更"
|
|
19
|
+
echo " - revert 回滚到上一次提交"
|
|
20
|
+
echo " - build 构建相关的变更"
|
|
21
|
+
echo " - ci CI/CD 配置或脚本调整"
|
|
22
|
+
echo ""
|
|
23
|
+
echo "2. scope(范围模块,可选):"
|
|
24
|
+
echo " - 可选字段,表明受影响的模块,例如 auth, api, ui 等。"
|
|
25
|
+
echo " - 如果省略,则提交格式为:<type>: <subject>"
|
|
26
|
+
echo ""
|
|
27
|
+
echo "3. subject(简要描述):"
|
|
28
|
+
echo " - 用一句话清晰描述本次提交的目的。"
|
|
29
|
+
echo " - 必须清晰、简短,不超过 72 个字符。"
|
|
30
|
+
echo " - 支持中文描述,可以用句号(。)结尾。"
|
|
31
|
+
echo " - subject 必须全部使用小写字母,不能使用句首大写、首字母大写、帕斯卡命名或全大写。(例如:update: gis弹窗添加基础功能, 地图定位)"
|
|
32
|
+
echo ""
|
|
33
|
+
echo "提交信息示例:"
|
|
34
|
+
echo " feat(auth): 添加用户登录功能"
|
|
35
|
+
echo " fix: 修复用户接口返回错误问题"
|
|
36
|
+
echo " update(ui): 优化表单组件样式"
|
|
37
|
+
echo " style: 调整代码格式,去除无用空格"
|
|
38
|
+
echo ""
|
|
39
|
+
echo "错误原因:提交信息不符合以上规范,请根据提示修改!"
|
|
40
|
+
echo ""
|
|
41
|
+
exit 1
|
|
42
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# node --experimental-modules scripts/auto-commit.mjs "$1"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 忽略构建输出目录
|
|
2
|
+
dist
|
|
3
|
+
out
|
|
4
|
+
|
|
5
|
+
# 忽略依赖目录
|
|
6
|
+
node_modules
|
|
7
|
+
|
|
8
|
+
# 忽略 Vite 自动生成的文件
|
|
9
|
+
index.html
|
|
10
|
+
|
|
11
|
+
# 忽略所有 .d.ts 文件
|
|
12
|
+
*.d.ts
|
|
13
|
+
|
|
14
|
+
# 忽略环境配置文件
|
|
15
|
+
.env
|
|
16
|
+
.env.local
|
|
17
|
+
.env.*.local
|
|
18
|
+
|
|
19
|
+
# 忽略自动生成的组件声明文件
|
|
20
|
+
src/components.d.ts
|
|
21
|
+
|
|
22
|
+
android
|
|
23
|
+
|
|
24
|
+
dev-dist
|
|
25
|
+
|
|
26
|
+
public/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
semi: true, // 在语句末尾添加分号
|
|
3
|
+
singleQuote: true, // 使用单引号而不是双引号
|
|
4
|
+
trailingComma: 'es5', // 多行时尽可能打印尾随逗号
|
|
5
|
+
bracketSpacing: true, // 在对象的括号之间添加空格
|
|
6
|
+
tabWidth: 2, // 指定每个缩进级别的空格数
|
|
7
|
+
useTabs: false, // 使用空格代替制表符
|
|
8
|
+
endOfLine: 'lf', // 维持现有的行尾(防止在不同操作系统间出现问题)
|
|
9
|
+
printWidth: 80, // 推荐值是 80 或 120
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
src/style/**
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Frontend Framework (Vue 3 + TypeScript + Vite)
|
|
2
|
+
|
|
3
|
+
面向小型开发团队的通用前端框架模板,提供清晰目录、可复用示例、统一配置与约定。
|
|
4
|
+
|
|
5
|
+
## 目录结构
|
|
6
|
+
|
|
7
|
+
project
|
|
8
|
+
├── interface/ # 📝 业务模型接口定义
|
|
9
|
+
├── public/ # 🌐 公共资源,打包会直接打进根目录
|
|
10
|
+
├── src
|
|
11
|
+
│ ├── api/ # 🔌 请求后端接口
|
|
12
|
+
│ ├── assets/ # 🖼 静态资源
|
|
13
|
+
│ ├── components/ # 🧩 公共基础组件
|
|
14
|
+
│ ├── directive/ # ⚡ 全局指令
|
|
15
|
+
│ ├── layout/ # 📐 布局组件
|
|
16
|
+
│ ├── router/ # 🛣 路由配置
|
|
17
|
+
│ ├── stores/ # 🗄 全局状态管理
|
|
18
|
+
│ ├── styles/ # 🎨 全局样式
|
|
19
|
+
│ ├── utils/ # 🛠 工具类
|
|
20
|
+
│ └── views/ # 📄 业务页面
|
|
21
|
+
├── tests/ # 🧪 测试目录
|
|
22
|
+
│ ├── unit/ # 单元测试(Vitest)
|
|
23
|
+
│ ├── e2e/ # E2E 测试
|
|
24
|
+
│ ├── setup.ts # 测试环境配置
|
|
25
|
+
│ └── utils/ # 测试工具函数
|
|
26
|
+
├── types/ # 📋 全局类型声明
|
|
27
|
+
├── vitest.config.ts # 🧪 Vitest 配置
|
|
28
|
+
└── package.json
|
|
29
|
+
|
|
30
|
+
## 示例说明
|
|
31
|
+
|
|
32
|
+
- `src/api/`:`modules/demo.ts` 演示接口调用
|
|
33
|
+
- `src/stores/`:`useCounter.ts` 演示 Pinia Store
|
|
34
|
+
- `src/directive/`:`focus.ts` 演示自定义指令
|
|
35
|
+
- `src/layout/`:`BasicLayout.vue` 演示布局壳
|
|
36
|
+
- `src/views/Test`:演示使用 store + api + composable
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['@commitlint/config-conventional'],
|
|
3
|
+
rules: {
|
|
4
|
+
// 提交消息的类型必须是以下之一
|
|
5
|
+
'type-enum': [
|
|
6
|
+
2, // 错误级别
|
|
7
|
+
'always',
|
|
8
|
+
[
|
|
9
|
+
'feat', // 新功能
|
|
10
|
+
'fix', // 修复问题
|
|
11
|
+
'update', // 更新现有功能
|
|
12
|
+
'docs', // 文档更新
|
|
13
|
+
'style', // 代码格式(不影响功能)
|
|
14
|
+
'refactor', // 重构代码(不影响功能)
|
|
15
|
+
'perf', // 性能优化
|
|
16
|
+
'test', // 添加或修改测试
|
|
17
|
+
'chore', // 杂项更新(比如构建工具)
|
|
18
|
+
'revert', // 回滚提交
|
|
19
|
+
'build', // 构建系统或外部依赖变更
|
|
20
|
+
'ci', // CI/CD 配置或脚本修改
|
|
21
|
+
],
|
|
22
|
+
],
|
|
23
|
+
// 允许范围为空
|
|
24
|
+
'scope-empty': [0, 'never'],
|
|
25
|
+
'scope-case': [2, 'always'],
|
|
26
|
+
// 提交消息的主题不能为空
|
|
27
|
+
'subject-empty': [2, 'never'],
|
|
28
|
+
// 不限制提交消息结尾的标点符号
|
|
29
|
+
'subject-full-stop': [0, 'never'],
|
|
30
|
+
// 限制提交消息的主题长度
|
|
31
|
+
'header-max-length': [2, 'always', 72],
|
|
32
|
+
// 'message-case': [2, 'always', 'lower-case'],
|
|
33
|
+
},
|
|
34
|
+
prompt: {
|
|
35
|
+
messages: {
|
|
36
|
+
skip: ':跳过',
|
|
37
|
+
max: '最多输入 %d 个字符',
|
|
38
|
+
min: '至少输入 %d 个字符',
|
|
39
|
+
emptyWarning: '请填写有效内容',
|
|
40
|
+
upperLimitWarning: '长度超过限制',
|
|
41
|
+
lowerLimitWarning: '长度不足',
|
|
42
|
+
},
|
|
43
|
+
questions: {
|
|
44
|
+
type: {
|
|
45
|
+
description: '选择提交类型(如:feat, fix, docs等)',
|
|
46
|
+
},
|
|
47
|
+
scope: {
|
|
48
|
+
description: '影响的模块范围(如:auth, api等,可选)',
|
|
49
|
+
},
|
|
50
|
+
subject: {
|
|
51
|
+
description: '简要描述本次提交(限72个字符以内)',
|
|
52
|
+
},
|
|
53
|
+
body: {
|
|
54
|
+
description: '详细描述本次提交(可选)',
|
|
55
|
+
},
|
|
56
|
+
breaking: {
|
|
57
|
+
description: '列出任何破坏性更新(可选)',
|
|
58
|
+
},
|
|
59
|
+
footer: {
|
|
60
|
+
description: '关联的issue,例如:#123, #456(可选)',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
2
|
+
import js from '@eslint/js';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { dirname } from 'node:path';
|
|
5
|
+
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
6
|
+
import tsParser from '@typescript-eslint/parser';
|
|
7
|
+
import vue from 'eslint-plugin-vue';
|
|
8
|
+
import vueParser from 'vue-eslint-parser';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
|
|
13
|
+
const compat = new FlatCompat({
|
|
14
|
+
baseDirectory: __dirname,
|
|
15
|
+
recommendedConfig: js.configs.recommended,
|
|
16
|
+
allConfig: js.configs.all,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export default [
|
|
20
|
+
{
|
|
21
|
+
ignores: [
|
|
22
|
+
'dist',
|
|
23
|
+
'out',
|
|
24
|
+
'node_modules',
|
|
25
|
+
'index.html',
|
|
26
|
+
'*.d.ts',
|
|
27
|
+
'.env',
|
|
28
|
+
'.env.local',
|
|
29
|
+
'.env.*.local',
|
|
30
|
+
'src/components.d.ts',
|
|
31
|
+
'public/**',
|
|
32
|
+
'dev-dist',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
...compat.extends(
|
|
36
|
+
'eslint:recommended',
|
|
37
|
+
'plugin:@typescript-eslint/recommended',
|
|
38
|
+
'plugin:prettier/recommended'
|
|
39
|
+
),
|
|
40
|
+
...vue.configs['flat/recommended'],
|
|
41
|
+
{
|
|
42
|
+
plugins: {
|
|
43
|
+
vue,
|
|
44
|
+
'@typescript-eslint': tseslint,
|
|
45
|
+
},
|
|
46
|
+
languageOptions: {
|
|
47
|
+
parser: vueParser,
|
|
48
|
+
parserOptions: {
|
|
49
|
+
parser: tsParser,
|
|
50
|
+
ecmaVersion: 2021,
|
|
51
|
+
sourceType: 'module',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
rules: {
|
|
55
|
+
'require-jsdoc': 'off',
|
|
56
|
+
'no-unused-vars': 'off',
|
|
57
|
+
'@typescript-eslint/no-unused-vars': [
|
|
58
|
+
'warn',
|
|
59
|
+
{
|
|
60
|
+
argsIgnorePattern: '^_',
|
|
61
|
+
varsIgnorePattern: '^_',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
'no-console': 'off',
|
|
65
|
+
'vue/no-unused-components': 'warn',
|
|
66
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
67
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
68
|
+
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
|
|
69
|
+
'vue/multi-word-component-names': 'off',
|
|
70
|
+
'@typescript-eslint/ban-ts-comment': [
|
|
71
|
+
'error',
|
|
72
|
+
{
|
|
73
|
+
'ts-ignore': 'allow-with-description',
|
|
74
|
+
'ts-expect-error': 'allow-with-description',
|
|
75
|
+
'ts-nocheck': true,
|
|
76
|
+
'ts-check': false,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
'vue/attribute-hyphenation': 'off',
|
|
80
|
+
'vue/html-closing-bracket-newline': 'off',
|
|
81
|
+
'vue/html-indent': 'off',
|
|
82
|
+
'vue/max-attributes-per-line': 'off',
|
|
83
|
+
'vue/multiline-html-element-content-newline': 'off',
|
|
84
|
+
'vue/no-mutating-props': 'off',
|
|
85
|
+
'vue/singleline-html-element-content-newline': 'off',
|
|
86
|
+
'no-undef': 'off',
|
|
87
|
+
'spaced-comment': 'off',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
files: ['**/*.cjs'],
|
|
92
|
+
rules: {
|
|
93
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/src/assets/favicon.svg" />
|
|
6
|
+
<meta
|
|
7
|
+
name="viewport"
|
|
8
|
+
content="width=device-width, initial-scale=1, viewport-fit=cover"
|
|
9
|
+
/>
|
|
10
|
+
<title>物联网地下水位监测系统</title>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div hidden>Copyright © 2026 四川水发勘测设计研究有限公司</div>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<script type="module" src="/src/main.ts"></script>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|