diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-06-24 14:33:20 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-06-24 14:57:51 +0200 |
commit | 95f0b2abff0b4fac110da4129dcc8a8ae51e0d32 (patch) | |
tree | 9ddefb5534104cde9d96f492cae7f242be85c413 /plugins | |
parent | 75ca42c675a3586c0bdfc9c5320f283d097bb27d (diff) | |
download | dokka-95f0b2abff0b4fac110da4129dcc8a8ae51e0d32.tar.gz dokka-95f0b2abff0b4fac110da4129dcc8a8ae51e0d32.tar.bz2 dokka-95f0b2abff0b4fac110da4129dcc8a8ae51e0d32.zip |
Fix npm caching
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/base/frontend/build.gradle.kts | 22 |
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 +} |