# vite-vue3-cli **Repository Path**: fast-snail-cli/vite-vue3-cli ## Basic Information - **Project Name**: vite-vue3-cli - **Description**: vite2.x+vue3 +vant +pinia - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-07-18 - **Last Updated**: 2023-03-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vite-vue3-cli [工程结构](#工程结构) | [启动方式](#启动方式) | [工程结构](#工程结构) | [目录结构](#目录结构) | [官方配置文档](#官方配置文档) ## 工程结构 - vite2.9 - vue3.2 - vue-router4 - pinia - vant - eslint-aribnb - prettier - jest+@vue/test-utils - autoimport - "node": ">=14", - "pnpm": ">=7.1.0" ## 启动方式 - pnpm install - pnpm run dev | pnpm start ## 目录结构 ``` vite-vue3-cli ├─.env.development // dev环境变量 ├─.env.production // prd环境变量 ├─.eslintignore // eslint忽略文件 ├─.eslintrc.js // eslint配置文件 ├─.prettierignore // prettier忽略文件 ├─.prettierrc.js // prettier配置文件 ├─README.md ├─auto-imports.d.ts // auto-import文件 ├─commitlint.config.js // git提交配置文件 ├─components.d.ts // compnents自动引入文件 ├─index.html // index.html ├─jest.config.ts // 配置文件 ├─package.json ├─pnpm-lock.yaml // pnpm包版本锁定文件 ├─tsconfig.json // ts配置文件 ├─vite.config.ts // vite配置文件 ├─src | ├─App.vue // 入口app.vue | ├─env.d.ts // 声明文件 | ├─main.ts // 入口ts | ├─views // 页面 | | ├─home | | | └index.vue | ├─utils // 工具类 | | └request.ts | ├─types // ts types或interface | | └index.d.ts | ├─tests // 单元测试文件 | | ├─unit | | | ├─a.spec.ts | | | └b.spec.ts | ├─store // 全局状态管理 | | ├─home.ts | | └index.ts | ├─router // 路由 | | └index.ts | ├─directives // 自定义指令 | | ├─index.ts | | └track.ts | | | components // 组件 | | | ├─assets // 静态资源 | | └logo.png | ├─api // 接口api | | └home.ts ├─public // 静态资源public | └favicon.ico ├─.husky // githooks文件 | ├─pre-commit | ├─_ | | └husky.sh ``` ## 官方配置文档 - [vite 配置官方文档](https://cn.vitejs.dev/config/) - [vue3 官方文档](https://v3.cn.vuejs.org/api/sfc-script-setup.html#%E5%9F%BA%E6%9C%AC%E8%AF%AD%E6%B3%95) - [vue-router 官方文档](https://router.vuejs.org/zh/introduction.html) - [pinia 官方文档](https://pinia.vuejs.org/introduction.html#why-should-i-use-pinia) - [vant](https://vant-contrib.gitee.io/vant/#/zh-CN) - [tsconfig 配置文档](https://www.tslang.cn/docs/handbook/tsconfig-json.html) - [jest 文档](https://www.jestjs.cn/docs/getting-started) - [vue/test-utils](https://test-utils.vuejs.org/guide/) - [eslint 文档](https://eslint.bootcss.com/docs/user-guide/getting-started)