From 446421ed7b6f6885088aa1667aeacaaa76ae6e2a Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sun, 20 Jun 2021 15:57:44 +0200 Subject: [PATCH] Set the output directory to ./compiledOutput --- build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index a6d43ef..0db977e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.3") } +val outputDirectory = file("$rootDir/compiledOutput") + kotlin { js(IR) { moduleName = "Username404_Website" @@ -34,6 +36,7 @@ kotlin { } browser { webpackTask { + destinationDirectory = outputDirectory output.libraryTarget = "global" cssSupport.enabled = true } @@ -52,3 +55,10 @@ kotlin { binaries.executable() } } + +tasks { + clean.get().delete.add(outputDirectory) + withType(ProcessResources::class) { + destinationDir = outputDirectory + } +}