allow the JS compiler to reference the JS library source so that maven based JS compilation can work & use the new kotlin.browser API

This commit is contained in:
James Strachan
2012-05-26 07:45:10 +01:00
parent aecb5c72c5
commit 1254aa9e6f
8 changed files with 129 additions and 3 deletions
@@ -31,6 +31,9 @@
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
<jsLibrarySourceDir>${kotlin-js-lib-srcdir}</jsLibrarySourceDir>
</configuration>
<executions>
<execution>
<id>js</id>
@@ -0,0 +1,19 @@
<html>
<head>
</head>
<body>
<h1>Kotlin Sample</h1>
<div id="foo">
</div>
<script type="text/javascript" src="target/js/kotlin-lib.js">
</script>
<script type="text/javascript" src="target/js/browser-example.js">
</script>
<script type="text/javascript">
</script>
</body>
</html>
@@ -5,6 +5,6 @@ import kotlin.browser.document
fun myApp() {
val element = document.getElementById("foo")
if (element != null) {
element.appendChild(document.createTextNode("Some Dynamically Created Contenet!!!"))
element.appendChild(document.createTextNode("Some Dynamically Created Content!!!"))
}
}