chore: update

This commit is contained in:
Anthony Fu 2023-12-04 18:06:19 +01:00
parent 9ec46868b8
commit 1da18b38a8
7 changed files with 1178 additions and 882 deletions

View File

@ -37,12 +37,10 @@
- ☁️ Deploy on Netlify, zero-config - ☁️ Deploy on Netlify, zero-config
<br> <br>
See [Vitesse](https://github.com/antfu/vitesse) for full featureset. See [Vitesse](https://github.com/antfu/vitesse) for full featureset.
## Dropped Features from [Vitesse](https://github.com/antfu/vitesse) ## Dropped Features from [Vitesse](https://github.com/antfu/vitesse)
- ~~i18n~~ - ~~i18n~~

View File

@ -1,87 +1,87 @@
<p align='center'> <p align='center'>
<img src='https://user-images.githubusercontent.com/11247099/111864893-a457fd00-899e-11eb-9f05-f4b88987541d.png' alt='Vitesse - Opinionated Vite Starter Template' width='600'/> <img src='https://user-images.githubusercontent.com/11247099/111864893-a457fd00-899e-11eb-9f05-f4b88987541d.png' alt='Vitesse - Opinionated Vite Starter Template' width='600'/>
</p> </p>
<h6 align='center'> <h6 align='center'>
<a href="https://vitesse-lite.netlify.app/">在线 Demo</a> <a href="https://vitesse-lite.netlify.app/">在线 Demo</a>
</h6> </h6>
<h5 align='center'> <h5 align='center'>
<b>轻量版的 <a href="https://github.com/antfu/vitesse">Vitesse</a></b> <b>轻量版的 <a href="https://github.com/antfu/vitesse">Vitesse</a></b>
</h5> </h5>
<br> <br>
<p align='center'> <p align='center'>
<a href="https://github.com/antfu/vitesse-lite/blob/main/README.md">English</a> | <b>简体中文</b> <a href="https://github.com/antfu/vitesse-lite/blob/main/README.md">English</a> | <b>简体中文</b>
</p> </p>
<br> <br>
## 特性 ## 特性
- ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite 3](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [ESBuild](https://github.com/evanw/esbuild) - 就是快! - ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite 3](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [ESBuild](https://github.com/evanw/esbuild) - 就是快!
- 🗂 [基于文件的路由](./src/pages) - 🗂 [基于文件的路由](./src/pages)
- 📦 [组件自动化加载](./src/components) - 📦 [组件自动化加载](./src/components)
- 🎨 [UnoCSS](https://github.com/unocss/unocss) - 高性能且极具灵活性的即时原子化 CSS 引擎 - 🎨 [UnoCSS](https://github.com/unocss/unocss) - 高性能且极具灵活性的即时原子化 CSS 引擎
- 😃 [各种图标集为你所用](https://github.com/antfu/unocss/tree/main/packages/preset-icons) - 😃 [各种图标集为你所用](https://github.com/antfu/unocss/tree/main/packages/preset-icons)
- 🔥 使用 [新的 `<script setup>` 语法](https://github.com/vuejs/rfcs/pull/227) - 🔥 使用 [新的 `<script setup>` 语法](https://github.com/vuejs/rfcs/pull/227)
- ✅ 使用 [Vitest](http://vitest.dev/) 进行单元和组件测试 - ✅ 使用 [Vitest](http://vitest.dev/) 进行单元和组件测试
- 🦾 TypeScript, 当然 - 🦾 TypeScript, 当然
- ☁️ 零配置部署 Netlify - ☁️ 零配置部署 Netlify
<br> <br>
完整特性,请查看 [Vitesse](https://github.com/antfu/vitesse) 完整特性,请查看 [Vitesse](https://github.com/antfu/vitesse)
## 从 [Vitesse](https://github.com/antfu/vitesse) 中删除了以下特性 ## 从 [Vitesse](https://github.com/antfu/vitesse) 中删除了以下特性
- ~~i18n~~ - ~~i18n~~
- ~~Layouts~~ - ~~Layouts~~
- ~~SSG~~ - ~~SSG~~
- ~~PWA~~ - ~~PWA~~
- ~~Markdown~~ - ~~Markdown~~
## 预配置 ## 预配置
### UI 框架 ### UI 框架
- [UnoCSS](https://github.com/antfu/unocss) - 高性能且极具灵活性的即时原子化 CSS 引擎 - [UnoCSS](https://github.com/antfu/unocss) - 高性能且极具灵活性的即时原子化 CSS 引擎
### Icons ### Icons
- [Iconify](https://iconify.design) - 使用任意的图标集,浏览:[🔍Icônes](https://icones.netlify.app/) - [Iconify](https://iconify.design) - 使用任意的图标集,浏览:[🔍Icônes](https://icones.netlify.app/)
- [UnoCSS 的纯 CSS 图标方案](https://github.com/antfu/unocss/tree/main/packages/preset-icons) - [UnoCSS 的纯 CSS 图标方案](https://github.com/antfu/unocss/tree/main/packages/preset-icons)
### 插件 ### 插件
- [Vue Router](https://github.com/vuejs/vue-router) - [Vue Router](https://github.com/vuejs/vue-router)
- [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) - 以文件系统为基础的路由 - [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) - 以文件系统为基础的路由
- [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 等,无需导入 - [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 等,无需导入
- [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - 自动加载组件 - [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - 自动加载组件
- [`unplugin-vue-macros`](https://github.com/sxzz/unplugin-vue-macros) - 探索并扩展更多的宏和语法糖到 Vue 中 - [`unplugin-vue-macros`](https://github.com/sxzz/unplugin-vue-macros) - 探索并扩展更多的宏和语法糖到 Vue 中
- [VueUse](https://github.com/antfu/vueuse) - 实用的 Composition API 工具合集 - [VueUse](https://github.com/antfu/vueuse) - 实用的 Composition API 工具合集
## 现在可以试试! ## 现在可以试试!
### GitHub 模板 ### GitHub 模板
[使用这个模板创建仓库](https://github.com/antfu/vitesse-lite/generate). [使用这个模板创建仓库](https://github.com/antfu/vitesse-lite/generate).
### 克隆到本地 ### 克隆到本地
如果您更喜欢使用更干净的 git 历史记录手动执行此操作 如果您更喜欢使用更干净的 git 历史记录手动执行此操作
```bash ```bash
npx degit antfu/vitesse-lite my-vitesse-app npx degit antfu/vitesse-lite my-vitesse-app
cd my-vitesse-app cd my-vitesse-app
pnpm i # 如果你没装过 pnpm, 可以先运行: npm install -g pnpm pnpm i # 如果你没装过 pnpm, 可以先运行: npm install -g pnpm
``` ```

View File

@ -1,7 +1,8 @@
import antfu from '@antfu/eslint-config' import antfu from '@antfu/eslint-config'
import unocss from '@unocss/eslint-plugin'
export default antfu( export default antfu(
{}, {
unocss.configs.flat, unocss: true,
formatters: true,
},
) )

View File

@ -1,25 +1,27 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml"> <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<title>Vitesse Lite</title> <title>Vitesse Lite</title>
<meta name="description" content="Opinionated Vite Starter Template"> <meta name="description" content="Opinionated Vite Starter Template" />
</head> </head>
<body class="font-sans dark:text-white dark:bg-hex-121212"> <body class="font-sans dark:text-white dark:bg-hex-121212">
<div id="app"></div> <div id="app"></div>
<noscript> <noscript>
<div>Please enable JavaScript to use this application.</div> <div>Please enable JavaScript to use this application.</div>
</noscript> </noscript>
<script> <script>
(function() { ;(function () {
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches const prefersDark =
const setting = localStorage.getItem('color-schema') || 'auto' window.matchMedia &&
if (setting === 'dark' || (prefersDark && setting !== 'light')) window.matchMedia('(prefers-color-scheme: dark)').matches
document.documentElement.classList.toggle('dark', true) const setting = localStorage.getItem('color-schema') || 'auto'
})() if (setting === 'dark' || (prefersDark && setting !== 'light'))
</script> document.documentElement.classList.toggle('dark', true)
<script type="module" src="/src/main.ts"></script> })()
</body> </script>
<script type="module" src="/src/main.ts"></script>
</body>
</html> </html>

View File

@ -1,11 +1,11 @@
[build.environment] [build.environment]
NODE_VERSION = "20" NODE_VERSION = "20"
[build] [build]
publish = "dist" publish = "dist"
command = "pnpm run build" command = "pnpm run build"
[[redirects]] [[redirects]]
from = "/*" from = "/*"
to = "/index.html" to = "/index.html"
status = 200 status = 200

View File

@ -1,7 +1,7 @@
{ {
"type": "module", "type": "module",
"private": true, "private": true,
"packageManager": "pnpm@8.10.5", "packageManager": "pnpm@8.11.0",
"scripts": { "scripts": {
"build": "vite build", "build": "vite build",
"dev": "vite --port 3333 --open", "dev": "vite --port 3333 --open",
@ -14,34 +14,35 @@
}, },
"dependencies": { "dependencies": {
"@vueuse/core": "^10.6.1", "@vueuse/core": "^10.6.1",
"vue": "^3.3.8", "vue": "^3.3.10",
"vue-router": "^4.2.5" "vue-router": "^4.2.5"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^2.0.0", "@antfu/eslint-config": "^2.3.1",
"@iconify-json/carbon": "^1.1.21", "@iconify-json/carbon": "^1.1.24",
"@types/node": "^20.9.2", "@types/node": "^20.10.3",
"@unocss/eslint-config": "^0.57.6", "@unocss/eslint-config": "^0.58.0",
"@unocss/eslint-plugin": "^0.57.6", "@unocss/eslint-plugin": "^0.58.0",
"@unocss/reset": "^0.57.6", "@unocss/reset": "^0.58.0",
"@vitejs/plugin-vue": "^4.5.0", "@vitejs/plugin-vue": "^4.5.1",
"@vue-macros/volar": "^0.17.3", "@vue-macros/volar": "^0.17.4",
"@vue/test-utils": "^2.4.2", "@vue/test-utils": "^2.4.3",
"eslint": "^8.54.0", "eslint": "^8.55.0",
"jsdom": "^22.1.0", "eslint-plugin-format": "^0.0.1",
"lint-staged": "^15.1.0", "jsdom": "^23.0.1",
"pnpm": "^8.10.5", "lint-staged": "^15.2.0",
"pnpm": "^8.11.0",
"simple-git-hooks": "^2.9.0", "simple-git-hooks": "^2.9.0",
"taze": "^0.12.0", "taze": "^0.13.0",
"typescript": "^5.3.2", "typescript": "^5.3.2",
"unocss": "^0.57.6", "unocss": "^0.58.0",
"unplugin-auto-import": "^0.16.7", "unplugin-auto-import": "^0.17.2",
"unplugin-vue-components": "^0.25.2", "unplugin-vue-components": "^0.26.0",
"unplugin-vue-macros": "^2.7.0", "unplugin-vue-macros": "^2.7.0",
"unplugin-vue-router": "^0.7.0", "unplugin-vue-router": "^0.7.0",
"vite": "^5.0.0", "vite": "^5.0.5",
"vitest": "^0.34.6", "vitest": "^1.0.0",
"vue-tsc": "^1.8.22" "vue-tsc": "^1.8.24"
}, },
"simple-git-hooks": { "simple-git-hooks": {
"pre-commit": "pnpm lint-staged" "pre-commit": "pnpm lint-staged"

1772
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff