Skip to content

Commit

Permalink
refactor: migrate antdv to v4 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan authored Oct 12, 2023
1 parent a208318 commit 831a01a
Show file tree
Hide file tree
Showing 131 changed files with 10,881 additions and 12,766 deletions.
16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

10 changes: 5 additions & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
ENV = 'production'

# 网站前缀
BASE_URL = /
VITE_BASE_URL = /

# base api
VUE_APP_BASE_API = '/api/admin/'
VUE_APP_BASE_SOCKET_PATH = '/ws-api'
VUE_APP_BASE_SOCKET_NSP = '/admin'
VITE_BASE_API = '/api/admin/'
VITE_BASE_SOCKET_PATH = '/ws-api'
VITE_BASE_SOCKET_NSP = '/admin'

# mock api
VUE_APP_MOCK_API = '/mock-api/'
VITE_MOCK_API = '/mock-api/'

12 changes: 6 additions & 6 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 只在开发模式中被载入
ENV = 'development'

# 网站前缀
BASE_URL = /
VITE_BASE_URL = /

# base api
VUE_APP_BASE_API = '/api/admin/'
VUE_APP_BASE_SOCKET_PATH = '/ws-api'
VUE_APP_BASE_SOCKET_NSP = '/admin'
VITE_BASE_API = '/api/admin/'
VITE_BASE_SOCKET_PATH = '/ws-api'
VITE_BASE_SOCKET_NSP = '/admin'

# mock api
VUE_APP_MOCK_API = '/mock-api/'
VITE_MOCK_API = '/mock-api/'

VITE_DROP_CONSOLE = false
16 changes: 8 additions & 8 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 只在生产模式中被载入
ENV = 'production'

# 网站前缀
BASE_URL = /vue3-antd-admin/

# base api
VUE_APP_BASE_API = 'https://nest-api.buqiyuan.site/api/admin/'
VUE_APP_BASE_SOCKET_PATH = '/ws-api'
VUE_APP_BASE_SOCKET_NSP = 'wss://nest-api.buqiyuan.site/admin'
VITE_BASE_API = 'https://nest-api.buqiyuan.site/api/admin/'
VITE_BASE_SOCKET_PATH = '/ws-api'
VITE_BASE_SOCKET_NSP = 'wss://nest-api.buqiyuan.site/admin'

# 网站前缀
VITE_BASE_URL = /vue3-antdv-admin/

# mock api
VUE_APP_MOCK_API = '/mock-api/'
VITE_MOCK_API = '/mock-api/'

VITE_DROP_CONSOLE = true
2 changes: 1 addition & 1 deletion .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vue3-antd-admin:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vue3-antdv-admin:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion .github/workflows/build-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vue3-antd-admin:stable
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vue3-antdv-admin:stable
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
with:
tag_name: ${{ github.ref }}
body: |
Please refer to [CHANGELOG.md](https://github.com/buqiyuan/vue3-antd-admin/blob/main/CHANGELOG.md) for details.
Please refer to [CHANGELOG.md](https://github.com/buqiyuan/vue3-antdv-admin/blob/main/CHANGELOG.md) for details.
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,48 @@ env:
on:
push:
branches: [main]

jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

# 设置服务器时区为东八区
- name: Set time zone
run: sudo timedatectl set-timezone 'Asia/Shanghai'

- name: Setup Node.js v16.x
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: '16'
registry-url: https://registry.npmjs.com/

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
version: latest

- name: Install
run: yarn install --frozen-lockfile

- uses: actions/cache@v3
- name: Cache ~/.pnpm-store
uses: actions/cache@v3
env:
cache-name: cache-pnpm-store
with:
# 缓存文件夹
path: node_modules/.cache/webpack/
key: ${{ github.ref.name }}-webpack-build
# 兜底使用 "main" 分支缓存
path: ~/.pnpm-store
key: ${{ runner.os }}-preview-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
main-webpack-build
${{ runner.os }}-preview-${{ env.cache-name }}-
${{ runner.os }}-preview-
${{ runner.os }}-
- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build
run: yarn build
run: pnpm build
env:
FORCE_COLOR: 2

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand All @@ -63,7 +64,7 @@ jobs:
dst: 'gitee/buqiyuan'
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
dst_token: ${{ secrets.GITEE_TOKEN }}
static_list: 'vue3-antd-admin'
static_list: 'vue3-antdv-admin'
force_update: true
debug: true

Expand All @@ -75,7 +76,7 @@ jobs:
# 注意在 Settings->Secrets 配置 GITEE_PASSWORD
gitee-password: ${{ secrets.GITEE_PASSWORD }}
# 注意替换为你的 Gitee 仓库,仓库名严格区分大小写,请准确填写,否则会出错
gitee-repo: buqiyuan/vue3-antd-admin
gitee-repo: buqiyuan/vue3-antdv-admin
# 是否强制使用 HTTPS
https: true
# 要部署的分支,默认是 master,若是其他分支,则需要指定(指定的分支必须存在)
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ node_modules
dist
.npmrc
.cache
.fleet

tests/server/static
tests/server/static/upload
Expand All @@ -18,7 +17,7 @@ tests/server/static/upload
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
*pnpm-debug.log*

# Editor directories and files
.idea
Expand All @@ -30,4 +29,5 @@ pnpm-debug.log*
*.sw?

# auto generate file
components.d.ts
types/auto-imports.d.ts
types/components.d.ts
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/dist/*
.local
.output.js
commitlint.config.js
/node_modules/**

**/*.svg
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "non-relative",
"npm.packageManager": "yarn",
"npm.packageManager": "pnpm",
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down Expand Up @@ -78,7 +78,7 @@
},
"stylelint.enable": true,
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
"stylelint.packageManager": "yarn",
"stylelint.packageManager": "pnpm",
"path-intellisense.mappings": {
"@/": "${workspaceRoot}/src"
},
Expand Down Expand Up @@ -125,7 +125,7 @@
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
"i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}",
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.displayLanguage": "zh-CN",
Expand Down
20 changes: 20 additions & 0 deletions .vscode/vue3.3.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"Vue3.3+defineOptions快速生成模板": {
"scope": "vue",
"prefix": "Vue3.3+",
"body": [
"<script setup lang='ts'>",
"defineOptions({",
"\tname: ''",
"})",
"</script>\n",
"<template>",
"\t<div>test</div>",
"</template>\n",
"<style lang='less' scoped>\n",
"</style>",
"$2"
],
"description": "Vue3.3+defineOptions快速生成模板"
}
}
8 changes: 0 additions & 8 deletions .yarnrc

This file was deleted.

Loading

1 comment on commit 831a01a

@vercel
Copy link

@vercel vercel bot commented on 831a01a Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue3-antd-admin – ./

vue3-antd-admin-git-main-buqiyuan.vercel.app
vue3-antd-admin.vercel.app
vue3-antd-admin-buqiyuan.vercel.app

Please sign in to comment.