Anyone know of a good guide for accessing KMP shar...
# multiplatform
n
Anyone know of a good guide for accessing KMP shared lib from a non-Kotlin JS app? Bonus if it covers publishing.
c
Don't know of a guide, but my guess would be provide the bundled
.js
files that your lib builds. Publishing would be tricky as I don't think there is a Gradle Yarn Publishing plugin. But you could probably create a Gradle Task to upload the file manually. I don't however know if KMP will export things like yarn/node files to also upload...
tbh, if it's just for you and not public, I would be lazy and just add the js files to github releases/repo etc
👍 1
n
Ahh okay. I'm starting to see the light. I have a compose project but that only generates composeApp.js. Running
jsBrowserProductionWebpack
on my
shared
lib does generate a
shared.js
that exposes my methods.
c
yeah, I've not tried, but yeah it normally generates what you "need" in outputs... etc