TheBrokenRail
e1f486a750
All checks were successful
ScriptCraft/pipeline/head This commit looks good
29 lines
589 B
Groovy
29 lines
589 B
Groovy
def typescriptRoot = 'src/main/ts'
|
|
def typescriptRootFile = new File(rootDir.absolutePath, typescriptRoot)
|
|
|
|
def typescriptOut = new File(typescriptRootFile, 'lib/ts')
|
|
|
|
task typescript(group: 'typescript', type: Exec) {
|
|
inputs.dir typescriptRootFile
|
|
outputs.dirs typescriptOut
|
|
|
|
workingDir typescriptRootFile
|
|
|
|
executable 'npm'
|
|
|
|
args 'run', 'build'
|
|
|
|
doFirst {
|
|
project.delete {
|
|
delete typescriptOut
|
|
}
|
|
}
|
|
}
|
|
|
|
processResources.dependsOn typescript
|
|
|
|
processResources {
|
|
from(typescriptOut.absolutePath) {
|
|
into 'scriptcraft'
|
|
}
|
|
} |