Skip to content

Instantly share code, notes, and snippets.

@abner
Created May 24, 2021 10:08
Show Gist options
  • Save abner/9a1d769e1fce875fe8752eca579e2f72 to your computer and use it in GitHub Desktop.
Save abner/9a1d769e1fce875fe8752eca579e2f72 to your computer and use it in GitHub Desktop.
Kotlin Script
#!/usr/bin/env kotlin
@file:Repository("https://jcenter.bintray.com")
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.11")
import kotlinx.html.*; import kotlinx.html.stream.*; import kotlinx.html.attributes.*
val addressee = args.firstOrNull() ?: "World"
print(createHTML().html {
body {
h1 { + "Hello, $addressee!" }
div { + "Olá mundo - pt-BR" }
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment