|
1 | 1 | plugins { |
2 | | - id 'base' |
3 | | - id "com.github.node-gradle.node" version "7.1.0" |
| 2 | + id 'base' |
| 3 | + id "com.github.node-gradle.node" version "7.1.0" |
4 | 4 | } |
5 | 5 |
|
6 | 6 | group 'run.halo.starter.ui' |
7 | 7 |
|
8 | 8 | tasks.register('buildFrontend', PnpmTask) { |
9 | | - args = ['build'] |
10 | | - dependsOn tasks.named('pnpmInstall') |
11 | | - inputs.dir(layout.projectDirectory.dir('src')) |
12 | | - inputs.files(fileTree( |
13 | | - dir: layout.projectDirectory, |
14 | | - includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml'])) |
15 | | - outputs.dir(layout.buildDirectory.dir('dist')) |
16 | | - shouldRunAfter(tasks.named('check')) |
| 9 | + group = 'build' |
| 10 | + description = 'Builds the UI project using pnpm.' |
| 11 | + args = ['build'] |
| 12 | + dependsOn tasks.named('pnpmInstall') |
| 13 | + inputs.dir(layout.projectDirectory.dir('src')) |
| 14 | + inputs.files(fileTree( |
| 15 | + dir: layout.projectDirectory, |
| 16 | + includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml'])) |
| 17 | + outputs.dir(layout.buildDirectory.dir('dist')) |
17 | 18 | } |
18 | 19 |
|
19 | | -tasks.register('checkFrontend', PnpmTask) { |
20 | | - args = ['test:unit'] |
21 | | - dependsOn tasks.named('pnpmInstall') |
| 20 | +tasks.register('pnpmCheck', PnpmTask) { |
| 21 | + group = 'verification' |
| 22 | + description = 'Runs unit tests using pnpm.' |
| 23 | + args = ['test:unit'] |
| 24 | + dependsOn tasks.named('pnpmInstall') |
22 | 25 | } |
23 | 26 |
|
24 | 27 | tasks.named('check') { |
25 | | - dependsOn tasks.named('checkFrontend') |
| 28 | + dependsOn tasks.named('pnpmCheck') |
26 | 29 | } |
27 | 30 |
|
28 | | -tasks.named('build') { |
29 | | - dependsOn tasks.named('buildFrontend') |
| 31 | +tasks.named('assemble') { |
| 32 | + dependsOn tasks.named('buildFrontend') |
30 | 33 | } |
0 commit comments