Refactor aligning for css support

#KT-39770 fixed
This commit is contained in:
Ilya Goncharov
2020-06-18 17:24:33 +03:00
parent c9c20bb34c
commit b8aff0660c
3 changed files with 33 additions and 16 deletions
@@ -209,8 +209,14 @@ abstract class GradleKotlinJSFrameworkSupportProvider(
kotlin {
js {
$jsSubTargetName {
${additionalSubTargetSettings() ?: ""}
}
""".trimIndent() +
(
additionalSubTargetSettings()
?.lines()
?.joinToString("\n", "\n", "\n") { " $it" } ?: ""
) +
"""
}
binaries.executable()
}
}
@@ -66,16 +66,19 @@ internal fun addBrowserSupport(module: Module) {
internal fun browserConfiguration(): String {
return """
|val cssSupport = { task: KotlinWebpack
| task.cssSupport.enabled = true
|}
|
|webpackTask {
| cssSupport(it)
|}
|
|runTask {
| cssSupport(it)
|}
""".trimMargin()
webpackTask {
cssSupport.enabled = true
}
runTask {
cssSupport.enabled = true
}
testTask {
useKarma {
useChromeHeadless()
webpackConfig.cssSupport.enabled = true
}
}
""".trimIndent()
}
@@ -184,8 +184,16 @@ abstract class AbstractKotlinDslGradleKotlinJSFrameworkSupportProvider(
kotlin {
js {
$jsSubTargetName {
${additionalSubTargetSettings() ?: ""}
}
""".trimIndent() +
(
additionalSubTargetSettings()
?.lines()
?.joinToString("\n", "\n", "\n") {
" $it"
} ?: ""
) +
"""
}
binaries.executable()
}
}