Parcel: Kotlin support

Created on 20 Oct 2018  路  3Comments  路  Source: parcel-bundler/parcel

馃檵 feature request

Support for building and including Kotlin (.kt) files. As Kotlin is getting increasingly popular, it makes sense for support to be built-in.

馃 Expected Behavior

When a .kt file is found, it should be included in the output as a JavaScript file or a WASM file (would be configurable)

馃槸 Current Behavior

The .kt file is just copied into the output directory.

馃拋 Possible Solution

Node packages exist that should be able to build Kotlin files, however after testing kotlin-node could not be installed and node-kotlin would generate an empty zip inside a zip.

Instead kotlinc could be downloaded from JetBrains/kotlin and run with the correct arguments to generate .js files, which could then be inputted back into the system to create the output.

馃敠 Context

I'm trying to use Kotlin instead of JavaScript or TypeScript because I prefer the language and how it works. As Kotlin can build to both JavaScript and WASM, it can be used as the single programming language in the project, as well as a server system.

馃捇 Examples

N/A

Help Wanted Feature

Most helpful comment

OK, I've created the pr - #2210

All 3 comments

It looks like WebPack has support for Kotlin, so maybe it could be ported over to Parcel.

Feel free to try this and open up a pr

Sent with GitHawk

OK, I've created the pr - #2210

Was this page helpful?
0 / 5 - 0 ratings

Related issues

devongovett picture devongovett  路  3Comments

davidnagli picture davidnagli  路  3Comments

algebraic-brain picture algebraic-brain  路  3Comments

jzimmek picture jzimmek  路  3Comments

mnn picture mnn  路  3Comments