Skip to content

Commit b302131

Browse files
authored
chore: update infrastructure for UI (#39)
更新 UI 部分的基础设施。 1. 更新所有的依赖为最新版本。 2. 添加 `@halo-dev/api-client` 和 `axios` 依赖。 3. pnpm 要求提升至 9。 4. 更新 Node 的 Gradle 插件。 ```release-note None ```
1 parent dad7849 commit b302131

13 files changed

Lines changed: 2793 additions & 3378 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Halo 2.0 插件开发快速开始模板。
99
所需环境:
1010

1111
1. Java 17
12-
2. Node 18
13-
3. pnpm 8
12+
2. Node 20
13+
3. pnpm 9
1414
4. Docker (可选)
1515

1616
克隆项目:

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id "com.github.node-gradle.node" version "5.0.0"
3+
id "com.github.node-gradle.node" version "7.0.2"
44
id "io.freefair.lombok" version "8.0.1"
55
id "run.halo.plugin.devtools" version "0.0.9"
66
}
@@ -52,5 +52,5 @@ build {
5252
}
5353

5454
halo {
55-
version = '2.11'
55+
version = '2.17'
5656
}

ui/.eslintrc.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ module.exports = {
99
"@vue/eslint-config-typescript/recommended",
1010
"@vue/eslint-config-prettier",
1111
],
12+
parserOptions: {
13+
ecmaVersion: "latest",
14+
},
1215
env: {
1316
"vue/setup-compiler-macros": true,
1417
},

ui/env.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
/// <reference types="vite/client" />
2-
3-
declare module "*.vue" {
4-
import Vue from "vue";
5-
export default Vue;
6-
}
2+
/// <reference types="unplugin-icons/types/vue" />

ui/package.json

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
{
22
"scripts": {
33
"dev": "vite build --watch --mode=development",
4-
"build": "vite build",
5-
"preview": "vite preview --port 4173",
6-
"test:unit": "vitest --environment jsdom",
7-
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
8-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
4+
"build": "run-p type-check \"build-only {@}\" --",
5+
"build-only": "vite build",
6+
"test:unit": "vitest",
7+
"type-check": "vue-tsc --build --force",
8+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
9+
"prettier": "prettier --write src/"
910
},
1011
"dependencies": {
11-
"@halo-dev/components": "^2.12.0",
12-
"@halo-dev/console-shared": "^2.12.0",
13-
"canvas-confetti": "^1.9.2",
14-
"vue": "^3.3.12"
12+
"@halo-dev/api-client": "^2.17.0",
13+
"@halo-dev/components": "^2.17.0",
14+
"@halo-dev/console-shared": "^2.17.0",
15+
"axios": "^1.7.2",
16+
"canvas-confetti": "^1.9.3",
17+
"vue": "^3.4.31"
1518
},
1619
"devDependencies": {
17-
"@halo-dev/ui-plugin-bundler-kit": "^2.12.0",
18-
"@iconify/json": "^2.2.159",
19-
"@rushstack/eslint-patch": "^1.6.1",
20+
"@halo-dev/ui-plugin-bundler-kit": "^2.17.0",
21+
"@iconify/json": "^2.2.224",
22+
"@rushstack/eslint-patch": "^1.10.3",
23+
"@tsconfig/node20": "^20.1.4",
2024
"@types/canvas-confetti": "^1.6.4",
21-
"@types/jsdom": "^20.0.1",
22-
"@types/node": "^16.18.68",
23-
"@vitejs/plugin-vue": "^3.2.0",
24-
"@vitejs/plugin-vue-jsx": "^2.1.1",
25-
"@vue/eslint-config-prettier": "^7.1.0",
26-
"@vue/eslint-config-typescript": "^11.0.3",
27-
"@vue/test-utils": "^2.4.3",
28-
"@vue/tsconfig": "^0.1.3",
29-
"eslint": "^8.56.0",
30-
"eslint-plugin-vue": "^9.19.2",
31-
"jsdom": "^19.0.0",
32-
"npm-run-all": "^4.1.5",
33-
"prettier": "^2.8.8",
34-
"sass": "^1.69.5",
35-
"typescript": "~4.7.4",
36-
"unplugin-icons": "^0.15.3",
37-
"vite": "^4.5.1",
38-
"vitest": "^0.24.5",
39-
"vue-tsc": "^1.8.25"
25+
"@types/jsdom": "^21.1.7",
26+
"@types/node": "^20.14.9",
27+
"@vitejs/plugin-vue": "^5.0.5",
28+
"@vue/eslint-config-prettier": "^9.0.0",
29+
"@vue/eslint-config-typescript": "^13.0.0",
30+
"@vue/test-utils": "^2.4.6",
31+
"@vue/tsconfig": "^0.5.1",
32+
"eslint": "^8.57.0",
33+
"eslint-plugin-vue": "^9.26.0",
34+
"jsdom": "^24.1.0",
35+
"npm-run-all2": "^6.2.0",
36+
"prettier": "^3.3.2",
37+
"sass": "^1.77.6",
38+
"typescript": "~5.5.3",
39+
"unplugin-icons": "^0.19.0",
40+
"vite": "^5.3.2",
41+
"vitest": "^1.6.0",
42+
"vue-tsc": "^2.0.24"
4043
}
4144
}

0 commit comments

Comments
 (0)