Skip to content

Commit 5359f32

Browse files
ruibabyguqing
andauthored
chore: update project infra (#63)
* chore: update project infra Signed-off-by: Ryan Wang <i@ryanc.cc> * Update build.gradle Co-authored-by: guqing <38999863+guqing@users.noreply.github.com> --------- Signed-off-by: Ryan Wang <i@ryanc.cc> Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>
1 parent ea96bce commit 5359f32

21 files changed

Lines changed: 247 additions & 279 deletions

.github/workflows/workflow.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ name: Build Plugin JAR File
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
paths:
8+
- "**"
9+
- "!**.md"
610
release:
711
types:
812
- created
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- "**"
18+
- "!**.md"
919

1020
jobs:
1121
build:
@@ -23,12 +33,12 @@ jobs:
2333
- name: Set up Node.js
2434
uses: actions/setup-node@v3
2535
with:
26-
node-version: 16
36+
node-version: 18
2737
- uses: pnpm/action-setup@v2.0.1
2838
name: Install pnpm
2939
id: pnpm-install
3040
with:
31-
version: 7
41+
version: 8
3242
run_install: false
3343
- name: Get pnpm store directory
3444
id: pnpm-cache

build.gradle

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
id 'java'
33
id "io.freefair.lombok" version "8.0.1"
4-
id "com.github.node-gradle.node" version "3.3.0"
5-
id "run.halo.plugin.devtools" version "0.0.4"
4+
id "com.github.node-gradle.node" version "5.0.0"
5+
id "run.halo.plugin.devtools" version "0.0.7"
66
}
77

88
group 'run.halo.comment.widget'
@@ -16,7 +16,7 @@ repositories {
1616
}
1717

1818
dependencies {
19-
implementation platform('run.halo.tools.platform:plugin:2.5.0-SNAPSHOT')
19+
implementation platform('run.halo.tools.platform:plugin:2.9.0-SNAPSHOT')
2020
compileOnly 'run.halo.app:api'
2121

2222
testImplementation 'run.halo.app:api'
@@ -31,18 +31,11 @@ node {
3131
nodeProjectDir = file("${project.projectDir}")
3232
}
3333

34-
task buildFrontend(type: NpxTask) {
35-
command = 'pnpm@7'
34+
task buildFrontend(type: PnpmTask) {
3635
args = ['build:packages']
3736
}
3837

39-
task pnpmInstall(type: NpxTask) {
40-
command = "pnpm@7"
41-
args = ["install"]
42-
}
43-
4438
build {
4539
// build frontend before build
4640
tasks.getByName('compileJava').dependsOn('buildFrontend')
47-
tasks.getByName("buildFrontend").dependsOn("pnpmInstall")
4841
}

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"name": "@halo-dev/plugin-comment-widget",
3-
"private": true,
42
"scripts": {
53
"build:packages": "pnpm --filter \"./packages/**\" build",
64
"example:dev": "pnpm --filter \"./packages/example\" dev",
@@ -23,7 +21,9 @@
2321
"axios": "^0.27.2",
2422
"pinia": "^2.1.3",
2523
"vue": "^3.3.4",
26-
"vue-router": "^4.2.2"
24+
"vue-router": "^4.2.2",
25+
"@vueuse/components": "^10.3.0",
26+
"@vueuse/core": "^10.3.0"
2727
},
2828
"devDependencies": {
2929
"@rushstack/eslint-patch": "^1.3.0",
@@ -34,16 +34,17 @@
3434
"@vue/eslint-config-prettier": "^7.1.0",
3535
"@vue/eslint-config-typescript": "^11.0.3",
3636
"@vue/test-utils": "^2.3.2",
37-
"@vue/tsconfig": "^0.1.3",
37+
"@vue/tsconfig": "^0.4.0",
38+
"@tsconfig/node18": "^18.2.2",
3839
"eslint": "^8.42.0",
3940
"eslint-plugin-vue": "^9.14.1",
4041
"jsdom": "^19.0.0",
4142
"npm-run-all": "^4.1.5",
4243
"prettier": "^2.8.8",
4344
"rollup-plugin-copy-merge": "^1.0.2",
44-
"typescript": "~4.7.4",
45+
"typescript": "~5.2.0",
4546
"vite": "^4.3.9",
4647
"vitest": "^0.28.5",
47-
"vue-tsc": "^1.6.5"
48+
"vue-tsc": "^1.8.13"
4849
}
4950
}

packages/comment-widget/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,17 @@
3131
"./dist/style.css": "./dist/style.css"
3232
},
3333
"dependencies": {
34-
"@halo-dev/api-client": "^2.6.0",
34+
"@halo-dev/api-client": "^2.9.0",
3535
"@halo-dev/components": "^1.5.0",
36-
"@vueuse/components": "8.9.4",
37-
"@vueuse/core": "8.9.4",
3836
"autosize": "^6.0.1",
39-
"dayjs": "^1.11.8",
40-
"emoji-mart-vue-fast": "^12.0.4",
37+
"dayjs": "^1.11.10",
38+
"emoji-mart-vue-fast": "^12.0.5",
4139
"javascript-time-ago": "^2.5.9",
4240
"lodash.clonedeep": "^4.5.0"
4341
},
4442
"devDependencies": {
4543
"@iconify-json/mdi": "^1.1.52",
46-
"@tailwindcss/forms": "^0.5.3",
44+
"@tailwindcss/forms": "^0.5.6",
4745
"@types/lodash.clonedeep": "^4.5.7",
4846
"@types/qs": "^6.9.7",
4947
"@types/uuid": "^8.3.4",
@@ -52,7 +50,7 @@
5250
"prettier-plugin-tailwindcss": "^0.1.13",
5351
"release-it": "^15.11.0",
5452
"sass": "^1.62.1",
55-
"tailwindcss": "^3.3.2",
53+
"tailwindcss": "^3.3.3",
5654
"tailwindcss-themer": "^2.0.3",
5755
"unplugin-icons": "^0.14.15",
5856
"vue-typegen": "^0.2.0"

packages/comment-widget/src/styles/dark.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
}
1616

1717
.btn-secondary {
18-
@apply dark:border-slate-600 dark:border-solid dark:border dark:bg-slate-900 dark:text-slate-50 dark:hover:text-white dark:hover:bg-slate-800;
18+
@apply dark:border dark:border-solid dark:border-slate-600 dark:bg-slate-900 dark:text-slate-50 dark:hover:bg-slate-800 dark:hover:text-white;
1919
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"extends": "@vue/tsconfig/tsconfig.web.json",
2+
"extends": "@vue/tsconfig/tsconfig.dom.json",
33
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
44
"exclude": ["src/**/__tests__/*"],
55
"compilerOptions": {
66
"composite": true,
7-
"lib": ["esnext"],
87
"baseUrl": ".",
98
"paths": {
109
"@/*": ["./src/*"]
1110
},
11+
"ignoreDeprecations": "5.0",
1212
"types": ["unplugin-icons/types/vue"]
1313
}
1414
}

packages/comment-widget/tsconfig.config.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/comment-widget/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"files": [],
33
"references": [
44
{
5-
"path": "./tsconfig.config.json"
5+
"path": "./tsconfig.node.json"
66
},
77
{
88
"path": "./tsconfig.app.json"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "@tsconfig/node18/tsconfig.json",
3+
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
4+
"compilerOptions": {
5+
"composite": true,
6+
"module": "ESNext",
7+
"types": ["node"],
8+
"moduleResolution": "Bundler"
9+
}
10+
}

packages/example/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"version": "0.0.0",
3-
"private": true,
42
"scripts": {
53
"dev": "vite",
64
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",

0 commit comments

Comments
 (0)