tree: cb466dc128b19d6ca15d6088a0d76b17b454eec5 [path history] [tgz]
  1. ReadMe.md
  2. js.ast/
  3. js.dce/
  4. js.frontend/
  5. js.inliner/
  6. js.libraries/
  7. js.parser/
  8. js.serializer/
  9. js.tests/
  10. js.translator/
  11. npm.templates/
js/ReadMe.md

JavaScript Translation

This module performs the translation of Kotlin source code to JavaScript.

There are various Kotlin APIs to JavaScript environments and libraries in the js.libraries project.

Compiling the Kotlin Standard Library for JavaScript

The Kotlin Standard Library for JS is built with gradle, see the corresponding module's ReadMe.

Reusing JVM based test cases in JavaScript

Any Kotlin test cases using the org.junit.Test annotation and the kotlin.test package, such as this test case are automatically converted to JavaScript using QUnit.

This allows the test cases to be run directly in a web page in any web browser.

Using the Kotlin Library in JavaScript

There is a simple sample which shows how to use the Kotlin Standard Library from inside JavaScript in a web page.

Contributing

We love contributions! The JavaScript translation could really use your help! If you fancy contributing: