Kotlin to JavaScript getting started


Hello all!

I’m newbie in Idea and Kotlin. I want to start Kotlin to JavaScript development, but i dont understand how configure my project for this purpose?

I have an Idea 13.1.1 and Kotlin plugin. I created Kotlin(JavaScript) project. In the src folder i created folder “web” and index.html file in this web folder. In the Run configuration i choose this folder for “Generated JavaScript file directory” and also set my index.html file.

But i can’t run my “Hello World” project, run button is disabled.

Thanks alot for any advice!

Questions about the Javascript API

I wrote a somewhat step by step tutorial here:


Let me know if that helps.


I configured output MyFile.Kt to folder js/app/ from your tutorial, but because i'm newbie in Idea, i don't understand how create artefact to copy kotlin.js to js/lib/ folder?

Can i place manually kotlin.js to js/lib/ folder at first time, or content of the kotlin.js file is dynamically and i must to configure artefacts?

upd: after copying the file kotlin.js to js/lib folder, my “Hello World Project” works fine!


You can copy the file manually yes or just create an artifact for it. I think in the blog post I mention a link in order to do that.   


Hi, Kirill

You can find simple k2js project in attachment.

Feel free to ask any questions. :wink:

k2js-example.zip (31.1 KB)