Set the output directory to ./compiledOutput

This commit is contained in:
Username404-59 2021-06-20 15:57:44 +02:00 committed by Username404
parent b8254404ea
commit 446421ed7b
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 10 additions and 0 deletions

View File

@ -14,6 +14,8 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.3") implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.3")
} }
val outputDirectory = file("$rootDir/compiledOutput")
kotlin { kotlin {
js(IR) { js(IR) {
moduleName = "Username404_Website" moduleName = "Username404_Website"
@ -34,6 +36,7 @@ kotlin {
} }
browser { browser {
webpackTask { webpackTask {
destinationDirectory = outputDirectory
output.libraryTarget = "global" output.libraryTarget = "global"
cssSupport.enabled = true cssSupport.enabled = true
} }
@ -52,3 +55,10 @@ kotlin {
binaries.executable() binaries.executable()
} }
} }
tasks {
clean.get().delete.add(outputDirectory)
withType(ProcessResources::class) {
destinationDir = outputDirectory
}
}