简体中文
模板总览
使用 create-bubbles 创建项目时,先选择框架,再选择模板。以下清单与当前仓库的 CLI 配置及模板目录对应。
CLI 内置模板
| 模板 | 当前技术栈与内容 |
|---|---|
| vue-vp-eslint | Vue 3、Vite+、ESLint、Antdv Next、Pinia、UnoCSS。 |
| vp-vue-eslint-vapor | Vue 3.6 RC、Vapor 模式、Vite+、Antdv Next、Pinia、UnoCSS。 |
| react-rsbuild-biome | React 19、Rsbuild、Biome、Ant Design、Alova。 |
| vp-react | React 19、Vite+、Ant Design、React Router、Tailwind CSS、Alova。 |
| vp-react-shadcn | React 19、Vite+、shadcn、Radix UI、Tailwind CSS、Sonner、Zustand。 |
| vp-monorepo-react-nestjs | React 与 Vue 两套前端、NestJS / Fastify 后端、PostgreSQL、Redis、BullMQ、MinIO,以及共享代码和国际化包。 |
| taro-vue-eslint | Taro 4.2、Vue 3.5、NutUI、UnoCSS、Alova,面向小程序和 H5。 |
| taro-react-oxc | Taro 4.2、React 18、NutUI React Taro、Tailwind CSS、Oxlint、Oxfmt。 |
| nextjs-vinext-eslint | Next.js 16、React 19、Vinext、ESLint、Ant Design。 |
可以在交互菜单中选择,也可以直接指定模板:
bash
pnpm create bubbles@latest my-project --template vue-vp-eslintElectron 桌面项目
CLI 的 Others → Electron 入口会调用外部的 create-electron-vite 脚手架,界面框架和项目配置由上游交互流程选择。CLI 中的选项名为 create-eletron-vite,保留当前源码拼写。
bash
pnpm create bubbles@latest my-desktop --template create-eletron-vite参见 Electron 创建说明。
仓库预览模板
vp-monorepo-react-hono 包含 React 前端、Hono 后端、Drizzle / PostgreSQL、Redis 和 BullMQ,提供 Node.js 与 Bun 服务入口。
当前模板目录已存在,但尚未注册到 CLI,不能通过 --template vp-monorepo-react-hono 创建。复制方式、环境变量与启动步骤见模板详情。
如何选择
- Vue 应用:使用
vue-vp-eslint;评估 Vapor 模式时选择vp-vue-eslint-vapor。 - React 应用:使用 Vite+ 时选择
vp-react或带 shadcn 的vp-react-shadcn;使用 Rsbuild 与 Biome 时选择react-rsbuild-biome。 - 前后端一体项目:选择
vp-monorepo-react-nestjs,按需启动 React 或 Vue 前端,并配置后端基础服务。 - 小程序 / H5:根据 Vue 或 React 选择对应 Taro 模板。
- Next.js 风格应用:选择
nextjs-vinext-eslint,运行命令与兼容事项见详情。 - 桌面应用:通过 Electron 入口进入上游脚手架。
各模板的运行时、包管理器与启动命令有所不同,请按对应详情页完成初始化。