Update minify

This commit is contained in:
2019-11-15 19:26:50 +01:00
parent 8f7b03b5b8
commit 88d2a8bff1
4 changed files with 47 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ buildscript {
ext.kotlin_version = '1.3.50'
repositories {
jcenter()
maven {
url "http://nexus.astraeus.nl/nexus/content/groups/public"
}
@@ -12,9 +13,11 @@ buildscript {
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.eriwen:gradle-js-plugin:1.12.1"
}
}
apply plugin: "com.eriwen.gradle.js"
apply plugin: 'kotlin-platform-js'
apply plugin: 'kotlin-dce-js'
@@ -55,3 +58,25 @@ runDceKotlinJs.doLast {
into("web/js/generated")
}
}
// Create new CombineJsTasks if you have multiple sets of JS files
combineJs {
dependsOn runDceKotlinJs
source = [
"${projectDir}/web/js/generated/kotlin.js",
"${projectDir}/web/js/generated/kotlinx-html-js.js",
"${projectDir}/web/js/generated/komp.js",
"${projectDir}/web/js/generated/komp-todo.js"
]
dest = file("${projectDir}/web/js/generated/todo.all.js")
}
minifyJs {
dependsOn combineJs
source = "${projectDir}/web/js/generated/todo.all.js"
dest = file("${projectDir}/web/js/generated/todo.all.min.js")
closure {
warningLevel = 'QUIET'
compilerOptions.languageIn = "ECMASCRIPT5"
}
}