c67c1a69b9
[JS IR] Fix review remarks - Fix translation mode from flags calculation - comment why not top level could be safely inlined [JS IR] Add test on exportness of internal val Revert "[Gradle, JS] Disable minimizing names in production by default" This reverts commit 700ff8634a73f155a2f0eaf963778216d6877075. [JS IR] Adopt reserved names Revert "[JS IR] Reserve interop names" This reverts commit 63f30becaf1a45750ff85aea3753aae9a85985f4. Revert "[JS IR] Clear minimized namer states" This reverts commit ef7f19fa8a928021e8bdfbee7fbb5285fc74b7ab. [JS IR] Clear minimized namer states [JS IR] Reserve interop names [JS IR] Separate arguments for users [JS IR] Minimized member names in tests [Gradle, JS] Disable minimizing names in production by default [JS IR] Fix extra helps [JS IR] Move mangling of signatures to linking namer [JS IR] Add key and minimized name generator [JS IR] cross module dependencies minimized [JS IR] Minimize names [JS IR] Cross module by index [JS IR] Fix warning [JS IR] Fix inlining accessors [JS IR] Bridges for property accessors [JS IR] Special case of jsFunctionSignature with property accessors [JS IR] Inline property accessor for non top level properties [JS IR] Reduce crossModule size Merge-request: KT-MR-5785 Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com> ^KT-51735 fixed ^KT-50504 fixed
JavaScript Translation
This module performs the translation of Kotlin source code to JavaScript.
There are various Kotlin APIs to JavaScript environments in the standard library.
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:
- check the contributing section on general stuff like getting the code etc
- try fix one of the pending JavaScript translation issues