mirror of
https://github.com/halo-dev/plugin-starter.git
synced 2025-10-18 17:51:50 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dfaccb5323 | ||
![]() |
18235095f3 | ||
![]() |
a91c64bbd5 |
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
Halo 2.x 插件开发快速开始模板。
|
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>
|
插件开发的详细文档请查阅:<https://docs.halo.run/developer-guide/plugin/introduction>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id "io.freefair.lombok" version "8.13"
|
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'
|
group 'run.halo.starter'
|
||||||
@@ -35,11 +35,13 @@ tasks.withType(JavaCompile).configureEach {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('processUiResources', Copy) {
|
tasks.register('processUiResources', Copy) {
|
||||||
from project(':ui').tasks.named('buildFrontend')
|
from project(':ui').layout.buildDirectory.dir('dist')
|
||||||
into layout.buildDirectory.dir('resources/main/console')
|
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')
|
dependsOn tasks.named('processUiResources')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,30 +1,33 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'base'
|
id 'base'
|
||||||
id "com.github.node-gradle.node" version "7.1.0"
|
id "com.github.node-gradle.node" version "7.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'run.halo.starter.ui'
|
group 'run.halo.starter.ui'
|
||||||
|
|
||||||
tasks.register('buildFrontend', PnpmTask) {
|
tasks.register('buildFrontend', PnpmTask) {
|
||||||
args = ['build']
|
group = 'build'
|
||||||
dependsOn tasks.named('pnpmInstall')
|
description = 'Builds the UI project using pnpm.'
|
||||||
inputs.dir(layout.projectDirectory.dir('src'))
|
args = ['build']
|
||||||
inputs.files(fileTree(
|
dependsOn tasks.named('pnpmInstall')
|
||||||
dir: layout.projectDirectory,
|
inputs.dir(layout.projectDirectory.dir('src'))
|
||||||
includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml']))
|
inputs.files(fileTree(
|
||||||
outputs.dir(layout.buildDirectory.dir('dist'))
|
dir: layout.projectDirectory,
|
||||||
shouldRunAfter(tasks.named('check'))
|
includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml']))
|
||||||
|
outputs.dir(layout.buildDirectory.dir('dist'))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('checkFrontend', PnpmTask) {
|
tasks.register('pnpmCheck', PnpmTask) {
|
||||||
args = ['test:unit']
|
group = 'verification'
|
||||||
dependsOn tasks.named('pnpmInstall')
|
description = 'Runs unit tests using pnpm.'
|
||||||
|
args = ['test:unit']
|
||||||
|
dependsOn tasks.named('pnpmInstall')
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named('check') {
|
tasks.named('check') {
|
||||||
dependsOn tasks.named('checkFrontend')
|
dependsOn tasks.named('pnpmCheck')
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named('build') {
|
tasks.named('assemble') {
|
||||||
dependsOn tasks.named('buildFrontend')
|
dependsOn tasks.named('buildFrontend')
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user