Skip to content

Commit

Permalink
迁移到 4.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Sep 11, 2024
1 parent ef0b86e commit fc75c33
Show file tree
Hide file tree
Showing 99 changed files with 9,899 additions and 7,442 deletions.
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ VITE_APP_TITLE = One-step-admin 基础版
VITE_APP_API_BASEURL = /
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
# 是否禁用开发者工具,可防止被调试
VITE_APP_DISABLE_DEVTOOL = false

# 是否开启代理
VITE_OPEN_PROXY = false
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ VITE_APP_TITLE = One-step-admin 基础版
VITE_APP_API_BASEURL = /
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
# 是否禁用开发者工具,可防止被调试
VITE_APP_DISABLE_DEVTOOL = false

# 是否在打包时启用 Mock
VITE_BUILD_MOCK = true
# 是否在打包时生成 sourcemap
VITE_BUILD_SOURCEMAP = false
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip,brotli
# 是否在打包后生成存档,支持 zip 和 tar
VITE_BUILD_ARCHIVE =
38 changes: 19 additions & 19 deletions .github/workflows/deploy-example-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,38 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# 选择要使用的 node 版本
node-version: 18
node-version: 20
# registry-url: https://registry.npmmirror.com/

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install antfu/ni
run: npm i -g @antfu/ni

Expand All @@ -50,15 +52,13 @@ jobs:
NODE_OPTIONS: --max-old-space-size=8192
run: nr build:example

# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
- name: deploy
uses: peaceiris/actions-gh-pages@v4
with:
# 部署到 gh-pages 分支
target_branch: gh-pages
# 部署目录
build_dir: dist-example
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./dist-example
enable_jekyll: true
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
4 changes: 2 additions & 2 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*.{ts,tsx,vue}": "eslint . --cache --fix",
"*.{css,scss,vue}": "stylelint src/**/*.{css,scss,vue} --cache --fix --allow-empty-input"
"*.{ts,tsx,vue}": "eslint --cache --fix",
"*.{css,scss,vue}": "stylelint --cache --fix"
}
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
shamefully-hoist=true
strict-peer-dependencies=false
engine-strict=true
2 changes: 0 additions & 2 deletions .stylelintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .stylelintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"mikestead.dotenv",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"vue.volar"
"Vue.volar",
"antfu.unocss"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"eslint.experimental.useFlatConfig": true,
"eslint.useFlatConfig": true,
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
Expand Down
5 changes: 4 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export default antfu(
rules: {
'eslint-comments/no-unlimited-disable': 'off',
'curly': ['error', 'all'],
'antfu/consistent-list-newline': 'off',
'ts/no-unused-expressions': ['error', {
allowShortCircuit: true,
allowTernary: true,
}],
},
},
)
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="browsers">
<a href="https://www.microsoft.com/edge" target="_blank" class="browser">
<img class="browser-icon" src="/browser_upgrade/edge.png" />
<div class="browser-name">Mircosoft Edge</div>
<div class="browser-name">Microsoft Edge</div>
</a>
<a href="https://www.google.cn/chrome/" target="_blank" class="browser">
<img class="browser-icon" src="/browser_upgrade/chrome.png" />
Expand Down
112 changes: 63 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"type": "module",
"version": "4.0.0",
"version": "4.7.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"scripts": {
"dev": "vite",
"build:example": "vue-tsc && vite build --mode example",
Expand All @@ -11,74 +14,85 @@
"lint": "npm-run-all -s lint:tsc lint:eslint lint:stylelint",
"lint:tsc": "vue-tsc",
"lint:eslint": "eslint . --cache --fix",
"lint:stylelint": "stylelint src/**/*.{css,scss,vue} --cache --fix --allow-empty-input",
"lint:stylelint": "stylelint \"src/**/*.{css,scss,vue}\" --cache --fix",
"postinstall": "simple-git-hooks",
"preinstall": "npx only-allow pnpm",
"commit": "git cz",
"release": "bumpp"
},
"dependencies": {
"@headlessui/vue": "^1.7.16",
"@idux/cdk": "2.0.0-beta.3",
"@idux/components": "2.0.0-beta.3",
"@vueuse/core": "^10.7.0",
"@vueuse/integrations": "^10.7.0",
"axios": "^1.6.2",
"dayjs": "^1.11.10",
"eruda": "^3.0.1",
"floating-vue": "2.0.0-beta.24",
"hotkeys-js": "^3.13.2",
"@headlessui/vue": "^1.7.22",
"@idux/cdk": "^2.4.1",
"@idux/components": "^2.4.3",
"@vueuse/components": "^11.0.3",
"@vueuse/core": "^11.0.3",
"@vueuse/integrations": "^11.0.3",
"axios": "^1.7.7",
"dayjs": "^1.11.13",
"disable-devtool": "^0.3.7",
"eruda": "^3.2.3",
"floating-vue": "5.2.2",
"hotkeys-js": "^3.13.7",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"mockjs": "^1.1.0",
"overlayscrollbars": "^2.4.5",
"overlayscrollbars-vue": "^0.5.6",
"pinia": "^2.1.7",
"qs": "^6.11.2",
"overlayscrollbars": "^2.10.0",
"overlayscrollbars-vue": "^0.5.9",
"pinia": "^2.2.2",
"qs": "^6.13.0",
"vconsole": "^3.15.1",
"vue": "^3.3.12",
"vue": "^3.4.38",
"vue-m-message": "^4.0.2",
"vue-router": "^4.2.5"
"vue-router": "^4.4.3"
},
"devDependencies": {
"@antfu/eslint-config": "2.4.6",
"@iconify/json": "^2.2.158",
"@iconify/vue": "^4.1.1",
"@antfu/eslint-config": "2.24.1",
"@iconify/json": "^2.2.243",
"@iconify/vue": "^4.1.2",
"@stylistic/stylelint-config": "^2.0.0",
"@types/lodash-es": "^4.17.12",
"@types/qs": "^6.9.10",
"@unocss/eslint-plugin": "^0.58.0",
"@vitejs/plugin-vue": "^4.5.2",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"autoprefixer": "^10.4.16",
"bumpp": "^9.2.1",
"cz-git": "^1.8.0",
"eslint": "^8.56.0",
"esno": "^4.0.0",
"@types/mockjs": "^1.0.10",
"@types/qs": "^6.9.15",
"@unocss/eslint-plugin": "^0.62.3",
"@vitejs/plugin-vue": "^5.1.3",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"archiver": "^7.0.1",
"autoprefixer": "^10.4.20",
"boxen": "^8.0.1",
"bumpp": "^9.5.2",
"cz-git": "^1.9.4",
"eslint": "^9.9.1",
"esno": "^4.7.0",
"fs-extra": "^11.2.0",
"http-server": "^14.1.1",
"inquirer": "^9.2.12",
"lint-staged": "^15.2.0",
"inquirer": "^10.1.8",
"lint-staged": "^15.2.9",
"npm-run-all": "^4.1.5",
"plop": "^4.0.0",
"postcss-html": "^1.5.0",
"sass": "^1.69.5",
"simple-git-hooks": "^2.9.0",
"stylelint": "^15.11.0",
"stylelint-config-standard-scss": "^11.1.0",
"picocolors": "^1.0.1",
"plop": "^4.0.1",
"postcss": "^8.4.42",
"postcss-html": "^1.7.0",
"postcss-nested": "^6.2.0",
"sass": "^1.77.8",
"simple-git-hooks": "^2.11.1",
"stylelint": "^16.9.0",
"stylelint-config-recess-order": "^5.1.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-config-standard-vue": "^1.0.0",
"stylelint-scss": "^5.3.2",
"stylelint-stylistic": "^0.4.3",
"svgo": "^3.1.0",
"typescript": "^5.3.3",
"unocss": "^0.58.0",
"unplugin-auto-import": "^0.17.2",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.0.10",
"stylelint-scss": "^6.5.1",
"svgo": "^3.3.2",
"typescript": "^5.5.4",
"unocss": "^0.62.3",
"unocss-preset-scrollbar": "^0.3.1",
"unplugin-auto-import": "^0.18.2",
"unplugin-turbo-console": "^1.10.1",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.4.2",
"vite-plugin-banner": "^0.7.1",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^2.9.8",
"vite-plugin-compression2": "^1.2.0",
"vite-plugin-fake-server": "^2.1.1",
"vite-plugin-svg-icons": "^2.0.1",
"vue-tsc": "^1.8.25"
"vue-tsc": "^2.1.4"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged",
Expand Down
4 changes: 2 additions & 2 deletions plop-templates/component/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ defineOptions({
</div>
</template>

<style lang="scss" scoped>
// 样式
<style scoped>
/* 样式 */
</style>
4 changes: 2 additions & 2 deletions plop-templates/page/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ defineOptions({
</div>
</template>

<style lang="scss" scoped>
// 样式
<style scoped>
/* 样式 */
</style>
Loading

0 comments on commit fc75c33

Please sign in to comment.