create-swdg-frontend
v0.2.2
Published
Scaffold a new SWDG frontend project
Readme
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-templateprepublishOnly 会自动 sync + validate。
环境变量:
TEMPLATE_DIR— 本地模板路径TEMPLATE_REPO/TEMPLATE_BRANCH— 远程 git 同步
包内容
bin/— 入口lib/— CLI 模块(prompts、gis、manifest、scaffold)stubs/— 无 GIS 时的 vite/tsconfig/env 替身template/— 同步后的完整项目
