# Vue Enterprise Boilerplate v3 (alpha)
This repo is currently in active development and considered in alpha release.
> This is an ever-evolving, opinionated architecture and dev environment for new Vue 3 + Vite SPA projects using [create-vue](https://github.com/vuejs/create-vue).
���� A huge thanks to [Chris Fritz](https://twitter.com/chrisvfritz) for the incredible work that this work builds upon. For those looking for his version, see [this branch for the original Vue 2 enterprise boilerplate](https://github.com/bencodezen/vue-enterprise-boilerplate/tree/vue-2-version).
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
1. Disable the built-in TypeScript Extension
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Type-Check, Compile and Minify for Production
```sh
npm run build
```
### Run Unit Tests with [Vitest](https://vitest.dev/)
```sh
npm run test:unit
```
### Run End-to-End Tests with [Playwright](https://playwright.dev)
```sh
# Install browsers for the first run
npx playwright install
# When testing on CI, must build the project first
npm run build
# Runs the end-to-end tests
npm run test:e2e
# Runs the tests only on Chromium
npm run test:e2e -- --project=chromium
# Runs the tests of a specific file
npm run test:e2e -- tests/example.spec.ts
# Runs the tests in debug mode
npm run test:e2e -- --debug
```
### Lint with [ESLint](https://eslint.org/)
```sh
npm run lint
```
没有合适的资源?快使用搜索试试~ 我知道了~
针对使用 Vue CLI 的新 Vue SPA 项目而构建的不断发展、极具主见的架构和开发环境 .zip
共47个文件
ts:15个
json:10个
scss:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 42 浏览量
2024-12-01
21:07:54
上传
评论
收藏 81KB ZIP 举报
温馨提示
Vue 企业样板 v3(alpha)这个 repo 目前正在积极开发中,并考虑发布 alpha 版本。这是一个不断发展、有主见的架构和开发环境,适用于使用create-vue的新 Vue 3 + Vite SPA 项目。 非常感谢Chris Fritz 的出色工作,这项工作正是基于此。如果您正在寻找他的版本,请参阅此分支以获取原始 Vue 2 企业样板。推荐的 IDE 设置VSCode + Volar(并禁用 Vetur)+ TypeScript Vue 插件(Volar)。.vueTS 中导入的类型支持.vue默认情况下,TypeScript 无法处理导入的类型信息,因此我们tsc用 CLI 替换了vue-tsc类型检查。在编辑器中,我们需要TypeScript Vue 插件 (Volar)来使 TypeScript 语言服务能够识别.vue类型。如果你觉得独立的 TypeScript 插件不够快,Volar 还实现了性能更高的Take Over Mode。你可以按照以下步骤启用它禁用内置 TypeScript 扩展Extensions: Sho
资源推荐
资源详情
资源评论
收起资源包目录
针对使用 Vue CLI 的新 Vue SPA 项目而构建的不断发展、极具主见的架构和开发环境。.zip (47个子文件)
tsconfig.vitest.json 153B
components.d.ts 647B
e2e
tsconfig.json 75B
vue.spec.ts 257B
.vscode
_sfc.code-snippets 2KB
settings.json 1KB
extensions.json 739B
tsconfig.node.json 241B
auto-imports.d.ts 19KB
标签.txt 39B
src
pages
about.vue 433B
index.vue 408B
main.ts 470B
App.vue 104B
assets
logo.svg 276B
types.ts 237B
design
_typography.scss 10KB
_sizes.scss 608B
index.scss 558B
_layers.scss 160B
_durations.scss 33B
_fonts.scss 568B
_colors.scss 377B
composables
useTheme.ts 281B
components
BaseInputText.spec.ts 1KB
BaseButton.vue 389B
BaseButton.spec.ts 671B
BaseInputText.vue 743B
stores
counter.ts 306B
router
routes.ts 367B
index.ts 211B
layouts
AppLayout.vue 124B
package.json 1KB
public
favicon.ico 4KB
package-lock.json 249KB
vitest.config.ts 461B
资源内容.txt 971B
.prettierrc.json 163B
env.d.ts 38B
tsconfig.app.json 299B
playwright.config.ts 3KB
.eslintrc.cjs 333B
vite.config.ts 825B
index.html 338B
.gitignore 286B
tsconfig.json 191B
README.md 3KB
共 47 条
- 1
资源评论
徐浪老师
- 粉丝: 8251
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功