26 lines
476 B
Plaintext
26 lines
476 B
Plaintext
|
import com.github.gradle.node.npm.task.NpmTask
|
||
|
|
||
|
plugins {
|
||
|
id("com.github.node-gradle.node") version "7.0.2"
|
||
|
}
|
||
|
|
||
|
|
||
|
tasks.register<NpmTask>("build") {
|
||
|
dependsOn(tasks.npmInstall)
|
||
|
args.set(listOf("run", "build"))
|
||
|
}
|
||
|
|
||
|
var dev = tasks.register<NpmTask>("dev") {
|
||
|
dependsOn(tasks.npmInstall)
|
||
|
args.set(listOf("run", "dev"))
|
||
|
}
|
||
|
|
||
|
tasks.register<NpmTask>("run") {
|
||
|
dependsOn(dev)
|
||
|
}
|
||
|
|
||
|
tasks.register<NpmTask>("test") {
|
||
|
dependsOn(tasks.npmInstall)
|
||
|
args.set(listOf("run", "test:unit"))
|
||
|
}
|