:wave: Hi there! I've been a Kotlin fan way back s...
# announcements
m
👋 Hi there! I've been a Kotlin fan way back since M11 or so and am now starting to play with multi-platform. We've got some functions we'd like to share between JS and JVM runtimes, but we already have a JS-based application that we don't want to re-write in Kotlin quite yet. I've done the tutorial here [1], which is fantastic, but I'm not sure how I can use NPM to install it directly and call into the Kotlin library from my JavaScript project. Can anyone offer any pointers? I've maven-published the library, but I see no mention of NPM or how to use a kotlin library with NPM in this tutorial. [1]: https://kotlinlang.org/docs/tutorials/mpp/multiplatform-library.html
I found this post from last year, but it's still not as clear as I was hoping: https://medium.com/swlh/kotlin-to-jar-and-npm-87a5b0ca2dff
b
m
@Big Chungus that's super helpful thank you. Surprising how much additional code is needed. Hopefully kotlin will bundle a separate publish task in the future.
b
We'll it's promoting its own ecosystem, which works flawlessly with gradle metadata
But it shouldn't be hard to write a third party plugin for kotlin npm publishing