Hey folks, We've got an Android & iOS app usi...
# javascript
i
Hey folks, We've got an Android & iOS app using KMM. We're looking to make the common code compile to a library usable in a web project (we don't want to use the kotlin/js wrappers) But there seems very little info on the kotlin docs on how to go about this - are there any links to example projects which achieve something similar? We'd be looking to create a similar workflow to Andorid/iOS where: • All projects exist in the same repo • The common code gets packaged as a JS library • Our web developer can use their own IDE of choice and import the JS library • The web IDE can hook into the shared code build process in a similar way to
packForXcode
Also, is there any interoperability guide similar to kotlin/native? Thanks!
b
Give my npm-publish plugin a go. Apply the plugin and run pack task. It should generate installable tarball for you (check sandbox in that repo for examples)
🙌 2
r
A more general guide to JsExport and friends: https://kotlinlang.org/docs/js-to-kotlin-interop.html. It is a little bare bones though, it would be nice to have some examples If you're using IR you'll want to look at it's specific pages, too.
👍 1
If you find particular spots where the documentation is lacking, making a post here and/or a youtrack issue is a good idea, JB has making efforts to add examples for JS and MPP stuff
m
I've pieced from a various different places in docs and public Github repos. I'll try to share the setup I got so far soon
🙌 1