A compiler implementation written in Kotlin that compiles source code into target code through lexical analysis, parsing, and multiple other phases.
jsMain: contains the core compiler logicjsTest: test directory for the main logic
These two packages are compiled to JS and used for production
jvmMainandjvmTest: generated automatically through building the project. These packages are copied versions ofjsMainandjsTestwithout js-specific code and are used only to generate test coverage reports, since Kover (the plugin we use to generate test reports) only supports JVM-compatible Kotlin code.
To build the project, run:
./gradlew build
To fix ktlint errors run:
./gradlew ktlintFormat or install the Ktlint plugin.
To run all tests, run:
./gradlew jsTest
To only compile Kotlin to JS without building the whole project run:
./gradlew compileKotlinJs
To generate a test coverage report,
-
Sync your jvm directories by running:
./gradlew syncJvmSources -
Then run:
./gradlew koverHtmlReport* These two commands are also part of the build command