mirror of
https://github.com/halo-dev/plugin-starter.git
synced 2026-01-13 06:05:59 +08:00
34 lines
853 B
Groovy
34 lines
853 B
Groovy
plugins {
|
|
id 'base'
|
|
id "com.github.node-gradle.node" version "7.1.0"
|
|
}
|
|
|
|
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'))
|
|
inputs.files(fileTree(
|
|
dir: layout.projectDirectory,
|
|
includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml']))
|
|
outputs.dir(layout.buildDirectory.dir('dist'))
|
|
}
|
|
|
|
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('pnpmCheck')
|
|
}
|
|
|
|
tasks.named('assemble') {
|
|
dependsOn tasks.named('buildFrontend')
|
|
}
|