3 Commits

Author SHA1 Message Date
John Niang
dfaccb5323 Bump Halo devtools to 0.6.1 (#56) 2025-06-26 11:53:54 +08:00
Ryan Wang
18235095f3 docs: add deprecated information in readme (#55)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-06-26 11:53:45 +08:00
John Niang
a91c64bbd5 Make sure the processUiResources task is executed after processResources (#54) 2025-06-23 22:51:58 +08:00
3 changed files with 27 additions and 19 deletions

View File

@@ -2,6 +2,9 @@
Halo 2.x 插件开发快速开始模板。
> [!WARNING]
> 此项目将在未来被标记为过时,后续建议使用 [halo-dev/create-halo-plugin](https://github.com/halo-dev/create-halo-plugin) 以交互式的方式创建 Halo 插件项目。
## 开发环境
插件开发的详细文档请查阅:<https://docs.halo.run/developer-guide/plugin/introduction>

View File

@@ -1,7 +1,7 @@
plugins {
id 'java'
id "io.freefair.lombok" version "8.13"
id "run.halo.plugin.devtools" version "0.6.0"
id "run.halo.plugin.devtools" version "0.6.1"
}
group 'run.halo.starter'
@@ -35,11 +35,13 @@ tasks.withType(JavaCompile).configureEach {
}
tasks.register('processUiResources', Copy) {
from project(':ui').tasks.named('buildFrontend')
from project(':ui').layout.buildDirectory.dir('dist')
into layout.buildDirectory.dir('resources/main/console')
dependsOn project(':ui').tasks.named('assemble')
shouldRunAfter tasks.named('processResources')
}
tasks.named('processResources', ProcessResources) {
tasks.named('classes') {
dependsOn tasks.named('processUiResources')
}

View File

@@ -6,6 +6,8 @@ plugins {
group 'run.halo.starter.ui'
tasks.register('buildFrontend', PnpmTask) {
group = 'build'
description = 'Builds the UI project using pnpm.'
args = ['build']
dependsOn tasks.named('pnpmInstall')
inputs.dir(layout.projectDirectory.dir('src'))
@@ -13,18 +15,19 @@ tasks.register('buildFrontend', PnpmTask) {
dir: layout.projectDirectory,
includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml']))
outputs.dir(layout.buildDirectory.dir('dist'))
shouldRunAfter(tasks.named('check'))
}
tasks.register('checkFrontend', PnpmTask) {
tasks.register('pnpmCheck', PnpmTask) {
group = 'verification'
description = 'Runs unit tests using pnpm.'
args = ['test:unit']
dependsOn tasks.named('pnpmInstall')
}
tasks.named('check') {
dependsOn tasks.named('checkFrontend')
dependsOn tasks.named('pnpmCheck')
}
tasks.named('build') {
tasks.named('assemble') {
dependsOn tasks.named('buildFrontend')
}