21 lines
427 B
Plaintext
Raw Normal View History

2020-12-24 02:08:03 +03:30
plugins {
2021-05-03 23:21:37 +04:30
id("com.github.node-gradle.node") version "3.0.1"
2020-12-24 02:08:03 +03:30
}
2021-05-20 19:51:32 +04:30
val nodeRoot = "${project.projectDir}/react"
2020-12-24 02:08:03 +03:30
node {
2021-05-20 19:51:32 +04:30
nodeProjectDir.set(file(nodeRoot))
2021-01-20 03:05:40 +03:30
}
2021-05-20 10:24:33 +04:30
tasks {
register<Copy>("copyBuild") {
2021-05-20 19:51:32 +04:30
from(file("$nodeRoot/build"))
2021-05-20 10:24:33 +04:30
into(file("$rootDir/server/src/main/resources/react"))
2021-01-20 03:05:40 +03:30
2021-05-20 10:24:33 +04:30
dependsOn("yarn_build")
}
2021-01-20 03:05:40 +03:30
2021-05-20 10:24:33 +04:30
named("yarn_build") {
dependsOn("yarn") // install node_modules
}
}