efemoney
02/20/2019, 11:21 AM/path/to/kotlin/script/runner
in #! /path/to/kotlin/script/runner -some -params
really point to?ilya.chernikov
02/20/2019, 1:30 PM#!/usr/bin/env kotlinc -cp dist/kotlinc/lib/kotlin-main-kts.jar -script
@file:Repository("<https://jcenter.bintray.com>")
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.11")
import kotlinx.html.*
import kotlinx.html.stream.*
print(createHTML().html {
body {
h1 { +"Hello, World!" }
}
})
(provided that kotlin is installed, path to the kotlin-main-kts.jar
is correct, the script has extension .main.kts
, executable atribute is set, and the shell is unix-based)ilya.chernikov
02/20/2019, 1:44 PMkotlinc
with appropriate params.Nikky
02/20/2019, 9:03 PMkotlinc --script
?ilya.chernikov
02/21/2019, 8:06 AMkotlinc -script
tries to construct script using the arguments supplied, i.e. - converting argument strings to the expected args of the script. There is no customization here, at least not yet.Nikky
02/21/2019, 8:18 AMilya.chernikov
02/21/2019, 8:20 AM