aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/frontend/build.gradle.kts
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-24 14:33:20 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-06-24 14:57:51 +0200
commit95f0b2abff0b4fac110da4129dcc8a8ae51e0d32 (patch)
tree9ddefb5534104cde9d96f492cae7f242be85c413 /plugins/base/frontend/build.gradle.kts
parent75ca42c675a3586c0bdfc9c5320f283d097bb27d (diff)
downloaddokka-95f0b2abff0b4fac110da4129dcc8a8ae51e0d32.tar.gz
dokka-95f0b2abff0b4fac110da4129dcc8a8ae51e0d32.tar.bz2
dokka-95f0b2abff0b4fac110da4129dcc8a8ae51e0d32.zip
Fix npm caching
Diffstat (limited to 'plugins/base/frontend/build.gradle.kts')
-rw-r--r--plugins/base/frontend/build.gradle.kts22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/base/frontend/build.gradle.kts b/plugins/base/frontend/build.gradle.kts
index 645ef826..a184c296 100644
--- a/plugins/base/frontend/build.gradle.kts
+++ b/plugins/base/frontend/build.gradle.kts
@@ -1,20 +1,20 @@
plugins {
- id("com.moowork.node") version "1.3.1"
+ id("com.github.node-gradle.node") version "2.2.4"
+}
+
+val npmRunBuild = tasks.getByName("npm_run_build") {
+ inputs.dir(file("src/main"))
+ inputs.files(file("package.json"), file("webpack.config.js"))
+ outputs.dir(file("dist/"))
+ outputs.cacheIf { true }
}
task("generateFrontendFiles") {
- dependsOn("npmInstall", "npm_run_build")
+ dependsOn(npmRunBuild)
}
tasks {
- val npmRunBuild by registering {
- inputs.dir("$projectDir/src/main/")
- inputs.files("$projectDir/package.json", "$projectDir/webpack.config.js")
- outputs.dir("$projectDir/dist/")
- outputs.cacheIf { true }
- }
-
clean {
- delete = setOf("$projectDir/node_modules", "$projectDir/dist/")
+ delete(file("node_modules"), file("dist"))
}
-} \ No newline at end of file
+}