Update minify
This commit is contained in:
2
.github/workflows/gradle.yml
vendored
2
.github/workflows/gradle.yml
vendored
@@ -14,4 +14,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 1.8
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew minifyJs
|
||||||
|
|||||||
25
build.gradle
25
build.gradle
@@ -2,6 +2,7 @@ buildscript {
|
|||||||
ext.kotlin_version = '1.3.50'
|
ext.kotlin_version = '1.3.50'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
jcenter()
|
||||||
maven {
|
maven {
|
||||||
url "http://nexus.astraeus.nl/nexus/content/groups/public"
|
url "http://nexus.astraeus.nl/nexus/content/groups/public"
|
||||||
}
|
}
|
||||||
@@ -12,9 +13,11 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
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-platform-js'
|
||||||
apply plugin: 'kotlin-dce-js'
|
apply plugin: 'kotlin-dce-js'
|
||||||
|
|
||||||
@@ -55,3 +58,25 @@ runDceKotlinJs.doLast {
|
|||||||
into("web/js/generated")
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,9 +12,6 @@
|
|||||||
<p>Compare other javascript MVC* frameworks with <a href="http://todomvc.com">TodoMVC</a></p>
|
<p>Compare other javascript MVC* frameworks with <a href="http://todomvc.com">TodoMVC</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="js/generated/kotlin.js" ></script>
|
<script src="js/generated/todo.all.min.js" ></script>
|
||||||
<script src="js/generated/kotlinx-html-js.js" ></script>
|
|
||||||
<script src="js/generated/komp.js" ></script>
|
|
||||||
<script src="js/generated/komp-todo.js" ></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
20
web/index_dev.html
Normal file
20
web/index_dev.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Komp-Todo</title>
|
||||||
|
<link rel="stylesheet" href="css/index.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<footer class="info">
|
||||||
|
<p>Double-click to edit a todo</p>
|
||||||
|
<p>Compare other javascript MVC* frameworks with <a href="http://todomvc.com">TodoMVC</a></p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="js/generated/kotlin.js" ></script>
|
||||||
|
<script src="js/generated/kotlinx-html-js.js" ></script>
|
||||||
|
<script src="js/generated/komp.js" ></script>
|
||||||
|
<script src="js/generated/komp-todo.js" ></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user