ekt/src/test/kotlin/net/shadowfacts/ekt/Test.kt

17 lines
316 B
Kotlin
Raw Normal View History

2017-08-04 19:38:25 +00:00
package net.shadowfacts.ekt
import java.io.File
/**
* @author shadowfacts
*/
fun main(args: Array<String>) {
2017-08-06 14:55:35 +00:00
val res = EKT.render("template", File("."), cacheScripts = true) {
2017-08-05 17:41:24 +00:00
"list" to (listOf(1, 2, 3) asType "List<Int>")
}
2017-08-04 19:38:25 +00:00
File("result.txt").apply {
if (!exists()) createNewFile()
writeText(res)
}
}