Is there any Java library to convert Kotlin to JavaScript code?
I have a String s = "contains Kotlin code"; which I want to convert to a JavaScript code? is it possible?
u
ugurk
05/31/2017, 7:57 AM
visruth: you can write content to a file
run kotlin compiler to generate js
v
visruth
05/31/2017, 8:00 AM
Okay but my use case is different.
visruth
05/31/2017, 8:01 AM
I have a project which declares JavaScript code in String. It's kept at server side and shares it to the client when needed. So if it's possible to convert Kotlin code to JavaScript code with the help of a jar then I can replace all JavaScript strings with Kotlin in my project and later I can convert it to javascript on demand.
I think it will help, the framework I'm using is https://webfirmframework.github.io so I have to keep JavaScript code at server side. If your solution is efficient enough (i.e. takes no much memory and cpu) then I can use it in my whole project.
Thanks for your help.