Update minify
This commit is contained in:
25
build.gradle
25
build.gradle
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user