https://kotlinlang.org logo
#javascript
Title
# javascript
m

Mikolaj

09/19/2023, 7:28 AM
Hello! Is there a kotlin/js library for generating
.kt
source files? Or any source files for that matter 😄
a

Artem Kobzar

09/19/2023, 8:17 AM
Hi 👋 What is your use-case? Maybe I could help with it
m

Mikolaj

09/19/2023, 8:25 AM
Hi 👋 I am creating a converter for SVG files to kotlin ImageView classes (for compose-multiplatform). For now I just use StringBuilder but I really could use something more sophisticated 😄
There is a IDE plugin for that but it does not meet my needs. I'll post for refference
a

Artem Kobzar

09/19/2023, 9:11 AM
And you need to create smth like KtAst to save it as a code in file? I believe that we don't support this case( https://github.com/arrow-kt/arrow-meta but as far as I know it works only with Kotlin/JVM
m

Mikolaj

09/19/2023, 9:14 AM
I need something more like KotlinPoet but targetting Kotlin/JS 😄 https://github.com/square/kotlinpoet . Thanks for the link tho, will take a look 👀
p

Piotr Krzemiński

09/19/2023, 9:18 AM
m

Mikolaj

09/19/2023, 9:24 AM
Thanks @Piotr Krzemiński hope this will be released soon 🤞 seems like untill it happens I'm stuck with
StringBuilder
🤷
e

Edoardo Luppi

09/19/2023, 11:56 AM
Damn, a multiplatform KotlinPoet would be lit.
👍 3
3 Views