# blog_frontSite **Repository Path**: zyjchen/personal-blog ## Basic Information - **Project Name**: blog_frontSite - **Description**: 个人博客 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2026-08-14 - **Last Updated**: 2026-09-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 个人博客 本项目基于 Vue3 + Vite + TypeScript 搭建的博客前端模板。 ## 技术栈 - **框架**:Vue 3(组合式API) - **构建工具**:Vite - **类型系统**:TypeScript - **类型检查**:vue‑tsc - **代码规范**:ESLint + Prettier + Stylelint - **测试**:Vitest ## 项目运行命令 ### 安装依赖 ```sh npm install ``` ### 本地开发(热更新) ```sh npm run dev ``` ### 代码规范 & 测试 ```sh npm run lint # ESLint 检查 npm run lint:fix # ESLint 自动修复 npm run format # Prettier 格式化 src/ npm run format:check # Prettier 格式检查(CI 使用) npm run stylelint # Stylelint 检查 SCSS npm run type-check # vue-tsc 类型检查 npm run test # Vitest 单元测试 npm run test:watch # 测试监听模式 npm run test:coverage # 测试覆盖率报告 ``` ### 提交规范 - 提交信息遵循 **Conventional Commits**(`feat: xxx` / `fix: xxx` / `chore: xxx` 等)。 - `pre-commit` 钩子会对暂存文件自动执行 lint-staged(ESLint + Prettier + Stylelint)。 - `commit-msg` 钩子用 commitlint 校验提交信息格式。 ## 推荐开发环境 ### IDE 推荐 VS Code + Vue‑Official(Volar)插件,**请务必禁用旧的 Vetur 插件**,否则会出现类型报错、语法高亮异常。 > 插件市场搜索:Vue‑Official ### 浏览器调试工具 - Chrome / Edge(Chromium内核浏览器) - 安装 Vue.js devtools 浏览器扩展 - 开发者工具开启:自定义对象格式化器(Custom Object Formatter) > 开启后调试控制台可以直接看到 Vue 响应式对象友好展示。 ## TypeScript 说明 TypeScript 默认无法识别 `.vue` 单文件组件类型。 本项目不直接使用 `tsc`,而是使用 `vue‑tsc` 做类型校验。 编辑器依靠 Volar 插件识别 `.vue` 文件类型信息。