Skip to content

Commit

Permalink
chore: 5.0.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang authored Dec 5, 2024
2 parents 52a5cb8 + 2431b21 commit c9859aa
Show file tree
Hide file tree
Showing 218 changed files with 5,609 additions and 5,080 deletions.
21 changes: 10 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# 修改配置后重启编辑器
# 配置项文档:https://editorconfig.org/
# 配置项文档:https://editorconfig.org(修改配置后重启编辑器)

# 告知 EditorConfig 插件,当前即是根文件
## 告知 EditorConfig 插件,当前即是根文件
root = true

# 适用全部文件
## 适用全部文件
[*]
## 设置字符集
### 设置字符集
charset = utf-8
## 缩进风格 space | tab,建议 space(会自动继承给 Prettier)
### 缩进风格 space | tab,建议 space
indent_style = space
## 缩进的空格数(会自动继承给 Prettier)
### 缩进的空格数
indent_size = 2
## 换行符类型 lf | cr | crlf,一般都是设置为 lf
### 换行符类型 lf | cr | crlf,一般都是设置为 lf
end_of_line = lf
## 是否在文件末尾插入空白行
### 是否在文件末尾插入空白行
insert_final_newline = true
## 是否删除一行中的前后空格
### 是否删除一行中的前后空格
trim_trailing_whitespace = true

# 适用 .md 文件
## 适用 .md 文件
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 所有环境自定义的环境变量(命名必须以 VITE_ 开头)
# 所有环境的环境变量(命名必须以 VITE_ 开头)

## 项目标题
VITE_APP_TITLE = V3 Admin Vite

## 路由模式 hash 或 html5
VITE_ROUTER_HISTORY = hash
13 changes: 5 additions & 8 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# 开发环境自定义的环境变量(命名必须以 VITE_ 开头)
# 开发环境的环境变量(命名必须以 VITE_ 开头)

## 后端接口公共路径(如果解决跨域问题采用反向代理就只需写公共路径
VITE_BASE_API = '/api/v1'
## 后端接口地址(如果解决跨域问题采用反向代理就只需写相对路径
VITE_BASE_URL = /api/v1

## 路由模式 hash 或 html5
VITE_ROUTER_HISTORY = 'hash'

## 开发环境地址前缀(一般 '/','./' 都可以)
VITE_PUBLIC_PATH = '/'
## 开发环境域名和静态资源公共路径(一般 / 或 ./ 都可以)
VITE_PUBLIC_PATH = /
13 changes: 5 additions & 8 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# 生产环境自定义的环境变量(命名必须以 VITE_ 开头)
# 生产环境的环境变量(命名必须以 VITE_ 开头)

## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径
VITE_BASE_API = 'https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1'
## 后端接口地址(如果解决跨域问题采用 CORS 就需要写绝对路径
VITE_BASE_URL = https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1

## 路由模式 hash 或 html5
VITE_ROUTER_HISTORY = 'hash'

## 打包路径(就是网站前缀,例如部署到 https://un-pany.github.io/v3-admin-vite/ 域名下,就需要填写 /v3-admin-vite/)
VITE_PUBLIC_PATH = '/v3-admin-vite/'
## 打包构建静态资源公共路径(例如部署到 https://un-pany.github.io/v3-admin-vite/ 域名下就需要填写 /v3-admin-vite/)
VITE_PUBLIC_PATH = /v3-admin-vite/
13 changes: 5 additions & 8 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# 预发布环境自定义的环境变量(命名必须以 VITE_ 开头)
# 预发布环境的环境变量(命名必须以 VITE_ 开头)

## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径
VITE_BASE_API = 'https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1'
## 后端接口地址(如果解决跨域问题采用 CORS 就需要写绝对路径
VITE_BASE_URL = https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1

## 路由模式 hash 或 html5
VITE_ROUTER_HISTORY = 'hash'

## 打包路径(就是网站前缀,例如部署到 https://un-pany.github.io/v3-admin-vite/ 域名下,就需要填写 /v3-admin-vite/)
VITE_PUBLIC_PATH = '/v3-admin-vite/'
## 打包构建静态资源公共路径(例如部署到 https://un-pany.github.io/ 域名下就需要填写 /)
VITE_PUBLIC_PATH = /
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

75 changes: 0 additions & 75 deletions .eslintrc.cjs

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
with:
persist-credentials: false

- name: Setup Node.js 20.17.0
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: 20.17.0
node-version: 22.11.0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9.11.0
version: 9.13.2

- name: Build
run: pnpm install && pnpm build:prod
run: pnpm install && pnpm build

- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@v4
- name: Set node
uses: actions/setup-node@v4
with:
node-version: 20.17.0
registry-url: https://registry.npmjs.org/
node-version: lts/*

- run: npx changelogithub
env:
Expand Down
31 changes: 7 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
# Git 会忽略的文件

.DS_Store
node_modules
# Common
dist
dist-ssr
node_modules
.eslintcache
vite.config.*.timestamp*

# MacOS
.DS_Store

# Local env files
*.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
!.vscode/*.code-snippets
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Use the PNPM
# Use the pnpm
package-lock.json
yarn.lock
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# 全局 ts 类型检查(此操作会增加 git commit 时长)
npx vue-tsc --noEmit
# 执行 lint-staged 中配置的任务
npx lint-staged
3 changes: 0 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# China mirror of npm
registry = https://registry.npmmirror.com

# 通过该配置兜底解决组件没有类型提示的问题
shamefully-hoist = true

# 安装依赖时锁定版本号
save-exact = true
8 changes: 0 additions & 8 deletions .prettierignore

This file was deleted.

3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"recommendations": [
"vue.volar",
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"vue.volar",
"antfu.unocss",
"vitest.explorer",
"wiensss.region-highlighter"
Expand Down
8 changes: 4 additions & 4 deletions .vscode/hook.code-snippets
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"Vue3 Hook 代码结构一键生成": {
"prefix": "Vue3 Hook",
"Vue3 Composable 代码结构一键生成": {
"prefix": "Vue3 Composable",
"body": [
"import { ref } from \"vue\"\n",
"const refName1 = ref<string>(\"这是一个响应式变量\")\n",
"export function useHookName() {",
"export function useName() {",
"\tconst refName2 = ref<string>(\"这是一个响应式变量\")\n",
"\tconst fnName = () => {}\n",
"\treturn { refName1, refName2, fnName }",
"}",
"$1"
],
"description": "Vue3 Hook"
"description": "Vue3 Composable"
}
}
76 changes: 49 additions & 27 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,53 @@
{
// Use workspace TypeScript version
"typescript.tsdk": "node_modules/typescript/lib",
"prettier.enable": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off", "fixable": true },
{ "rule": "format/*", "severity": "off", "fixable": true },
{ "rule": "*-indent", "severity": "off", "fixable": true },
{ "rule": "*-spacing", "severity": "off", "fixable": true },
{ "rule": "*-spaces", "severity": "off", "fixable": true },
{ "rule": "*-order", "severity": "off", "fixable": true },
{ "rule": "*-dangle", "severity": "off", "fixable": true },
{ "rule": "*-newline", "severity": "off", "fixable": true },
{ "rule": "*quotes", "severity": "off", "fixable": true },
{ "rule": "*semi", "severity": "off", "fixable": true }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"svelte",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}
Loading

0 comments on commit c9859aa

Please sign in to comment.