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

19 lines
370 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>) {
val res = EKT.render(File("template.ekt"), mapOf(
"title" to "EKT Test",
"body" to "some test content",
"value" to 42
2017-08-04 20:58:17 +00:00
), dumpGeneratedScript = File("script.kts"))
2017-08-04 19:38:25 +00:00
File("result.txt").apply {
if (!exists()) createNewFile()
writeText(res)
}
}