# MinarVite **Repository Path**: Minar/minar-vite ## Basic Information - **Project Name**: MinarVite - **Description**: 基于vite8的ssg框架 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-14 - **Last Updated**: 2026-08-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CMS-Vite 招证 CMS 前端脚手架 — 基于 Vite 8 + Vue 3 的 SSG 构建工具链。 ## 快速开始 ```sh # 安装依赖 bun install # 启动开发服务器 cd app && bun dev # 生产构建 bun x cbv build ``` ## 项目结构 ``` cms-vite/ ├── app/ # 应用模板(新项目起点) │ ├── pages/ # 文件系统路由 │ ├── stores/ # Pinia stores │ ├── tests/ # 测试 (e2e/ + components/) │ ├── cbv.config.ts # 项目配置(代理、UI库) │ └── index.ts # 应用初始化(bootstrap) ├── template/ # Vite 入口模板(App.vue, main.ts, layouts) ├── packages/ │ ├── framework/ # CDN 外部化框架(Vue, vue-router, axios, unhead) │ ├── linter/ # 共享 lint/format/tsconfig │ └── plugins/ # 内部 Vite 插件 └── command/ # cbv CLI (dev, build, tsc, preview) ``` ## 技术栈 | 类别 | 技术 | |------|------| | 构建 | Vite 8.1, Bun, Rolldown | | 框架 | Vue 3.5, vue-router 5.2, Pinia 4 | | SSG | vite-ssg 28, @unhead 3 | | UI | Vant 4 / Element Plus, UnoCSS | | 类型 | TypeScript 5.9, vue-tsc | | 测试 | Vitest 4.1, Playwright Test 1.61 | | Lint | Oxlint 1.74, ESLint 10.7, Oxfmt | ## 测试 ```sh # 单元测试 (jsdom) cd app && bun test:unit # E2E 测试 (Playwright, 需先 bun dev) cd app && bun test:e2e ``` ## 项目配置 通过 `cbv.config.ts` 配置项目: ```ts export default { uiLibrary: 'vant', // 'vant' | 'element-plus' proxy: [ // 开发代理 { context: ['/api/**'], target: 'https://dev.example.com', changeOrigin: true }, ], } ``` ## 新建项目 ```sh # 1. 复制 app/ 目录 cp -r app/ my-new-project/ # 2. 安装依赖并配置 cd my-new-project && bun install # 3. 编辑 cbv.config.ts 配置代理 # 4. 在 pages/ 下创建页面 # 5. 在 index.ts 中初始化 Pinia/登录等 # 启动开发 bun dev ```