create-swdg-frontend
create-swdg-frontend
从 SWDG 模板生成新项目。
官方命令:
pnpm create swdg-frontend my-app
| ✅ | pnpm create swdg-frontend / pnpm dlx create-swdg-frontend |
| ❌ | pnpm create swdg(会解析为不存在的 npm 包 create-swdg) |
常用参数
| 参数 | 说明 |
|---|---|
--no-gis |
不引入 Cesium(默认交互也为否) |
--gis |
启用 GIS 依赖与示例 |
--no-install |
跳过安装 |
--verify |
安装后执行 typecheck |
--git |
git init |
生成项目包含 .swdg/manifest.json 记录创建选项。
维护(模板负责人)
# 从 monorepo 根目录同步
pnpm run sync-template
# 发布前校验 template 能 typecheck
pnpm run validate-template
prepublishOnly 会自动 sync + validate。
环境变量:
TEMPLATE_DIR— 本地模板路径TEMPLATE_REPO/TEMPLATE_BRANCH— 远程 git 同步
包内容
bin/— 入口lib/— CLI 模块(prompts、gis、manifest、scaffold)stubs/— 无 GIS 时的 vite/tsconfig/env 替身template/— 同步后的完整项目
Related Packages
@singapore-tech/create-app
Create a SIT web app (Vite + React or Vue + Tailwind v4 + SIT Design System) wit...
0
create-vue-workspace
Scaffold a Vue 3 pnpm monorepo (apps/* + packages/*) with independently publisha...
312
Version History
| Version | Released | License |
|---|---|---|
| 0.2.2 | MIT | |
| 0.2.1 | MIT | |
| 0.2.0 | MIT | |
| 0.1.7 | MIT | |
| 0.1.6 | MIT | |
| 0.1.5 | MIT | |
| 0.1.4 | MIT | |
| 0.1.1 | MIT | |
| 0.1.0 | MIT |