Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Sep 25, 2023
2 parents 5733ee1 + 5359f32 commit 82fb1dc
Show file tree
Hide file tree
Showing 21 changed files with 247 additions and 279 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@ name: Build Plugin JAR File

on:
push:
branches: [ main ]
branches:
- main
paths:
- "**"
- "!**.md"
release:
types:
- created
pull_request:
branches:
- main
paths:
- "**"
- "!**.md"

jobs:
build:
Expand All @@ -23,12 +33,12 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
Expand Down
15 changes: 4 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'java'
id "io.freefair.lombok" version "8.0.1"
id "com.github.node-gradle.node" version "3.3.0"
id "run.halo.plugin.devtools" version "0.0.4"
id "com.github.node-gradle.node" version "5.0.0"
id "run.halo.plugin.devtools" version "0.0.7"
}

group 'run.halo.comment.widget'
Expand All @@ -16,7 +16,7 @@ repositories {
}

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

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

task buildFrontend(type: NpxTask) {
command = 'pnpm@7'
task buildFrontend(type: PnpmTask) {
args = ['build:packages']
}

task pnpmInstall(type: NpxTask) {
command = "pnpm@7"
args = ["install"]
}

build {
// build frontend before build
tasks.getByName('compileJava').dependsOn('buildFrontend')
tasks.getByName("buildFrontend").dependsOn("pnpmInstall")
}
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"name": "@halo-dev/plugin-comment-widget",
"private": true,
"scripts": {
"build:packages": "pnpm --filter \"./packages/**\" build",
"example:dev": "pnpm --filter \"./packages/example\" dev",
Expand All @@ -23,7 +21,9 @@
"axios": "^0.27.2",
"pinia": "^2.1.3",
"vue": "^3.3.4",
"vue-router": "^4.2.2"
"vue-router": "^4.2.2",
"@vueuse/components": "^10.3.0",
"@vueuse/core": "^10.3.0"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.3.0",
Expand All @@ -34,16 +34,17 @@
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/test-utils": "^2.3.2",
"@vue/tsconfig": "^0.1.3",
"@vue/tsconfig": "^0.4.0",
"@tsconfig/node18": "^18.2.2",
"eslint": "^8.42.0",
"eslint-plugin-vue": "^9.14.1",
"jsdom": "^19.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"rollup-plugin-copy-merge": "^1.0.2",
"typescript": "~4.7.4",
"typescript": "~5.2.0",
"vite": "^4.3.9",
"vitest": "^0.28.5",
"vue-tsc": "^1.6.5"
"vue-tsc": "^1.8.13"
}
}
12 changes: 5 additions & 7 deletions packages/comment-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,17 @@
"./dist/style.css": "./dist/style.css"
},
"dependencies": {
"@halo-dev/api-client": "^2.6.0",
"@halo-dev/api-client": "^2.9.0",
"@halo-dev/components": "^1.5.0",
"@vueuse/components": "8.9.4",
"@vueuse/core": "8.9.4",
"autosize": "^6.0.1",
"dayjs": "^1.11.8",
"emoji-mart-vue-fast": "^12.0.4",
"dayjs": "^1.11.10",
"emoji-mart-vue-fast": "^12.0.5",
"javascript-time-ago": "^2.5.9",
"lodash.clonedeep": "^4.5.0"
},
"devDependencies": {
"@iconify-json/mdi": "^1.1.52",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/forms": "^0.5.6",
"@types/lodash.clonedeep": "^4.5.7",
"@types/qs": "^6.9.7",
"@types/uuid": "^8.3.4",
Expand All @@ -52,7 +50,7 @@
"prettier-plugin-tailwindcss": "^0.1.13",
"release-it": "^15.11.0",
"sass": "^1.62.1",
"tailwindcss": "^3.3.2",
"tailwindcss": "^3.3.3",
"tailwindcss-themer": "^2.0.3",
"unplugin-icons": "^0.14.15",
"vue-typegen": "^0.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/comment-widget/src/styles/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
}

.btn-secondary {
@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;
@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;
}
4 changes: 2 additions & 2 deletions packages/comment-widget/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"lib": ["esnext"],
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"ignoreDeprecations": "5.0",
"types": ["unplugin-icons/types/vue"]
}
}
8 changes: 0 additions & 8 deletions packages/comment-widget/tsconfig.config.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/comment-widget/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"files": [],
"references": [
{
"path": "./tsconfig.config.json"
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
Expand Down
10 changes: 10 additions & 0 deletions packages/comment-widget/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "@tsconfig/node18/tsconfig.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
"compilerOptions": {
"composite": true,
"module": "ESNext",
"types": ["node"],
"moduleResolution": "Bundler"
}
}
2 changes: 0 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
Expand Down
1 change: 1 addition & 0 deletions packages/example/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts" setup>
// @ts-ignore
import { Comment } from "@halo-dev/comment-widget";
import "@halo-dev/comment-widget/dist/style.css";
import { useLocalStorage } from "@vueuse/core";
Expand Down
18 changes: 5 additions & 13 deletions packages/example/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": [
"./env.d.ts",
"./src/**/*",
"./src/**/*.vue"
],
"exclude": [
"./src/**/__tests__/*"
],
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["./env.d.ts", "./src/**/*", "./src/**/*.vue"],
"exclude": ["./src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
}
"@/*": ["./src/*"]
},
}
}
13 changes: 0 additions & 13 deletions packages/example/tsconfig.config.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"files": [],
"references": [
{
"path": "./tsconfig.config.json"
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
Expand Down
9 changes: 9 additions & 0 deletions packages/example/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@tsconfig/node18/tsconfig.json",
"include": ["./vite.config.*", "./vitest.config.*"],
"compilerOptions": {
"composite": true,
"types": ["node"],
"moduleResolution": "Bundler"
}
}
4 changes: 1 addition & 3 deletions packages/widget/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"version": "1.0.0",
"private": true,
"scripts": {
"build": "vite build",
"typecheck": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint ./src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
"prettier": "prettier --write './src/**/*.{vue,js,jsx,ts,tsx,css,scss,json,yml,yaml,html}'"
},
Expand Down
17 changes: 4 additions & 13 deletions packages/widget/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": [
"./env.d.ts",
"./src/**/*",
"./src/**/*.vue"
],
"exclude": [
"./src/**/__tests__/*",
"./packages/**/*"
],
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["./env.d.ts", "./src/**/*", "./src/**/*.vue"],
"exclude": ["./src/**/__tests__/*", "./packages/**/*"],
"compilerOptions": {
"baseUrl": ".",
"composite": true,
"noImplicitAny": false,
"paths": {
"@/*": [
"./src/*"
]
"@/*": ["./src/*"]
}
}
}
12 changes: 4 additions & 8 deletions packages/widget/tsconfig.vite-config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": [
"./vite.config.*"
],
"extends": "@tsconfig/node18/tsconfig.json",
"include": ["./vite.config.*"],
"compilerOptions": {
"composite": true,
"types": [
"node",
"vitest"
]
"types": ["node", "vitest"],
"moduleResolution": "Bundler"
}
}
Loading

0 comments on commit 82fb1dc

Please sign in to comment.