I'd rather not have to manually copy the script to...
# javascript
b
I'd rather not have to manually copy the script to my web-application every time i build it...
d
compileKotlin2Js.kotlinOptions.outputFile
a
On the other hand if you are using a plain IDEA, you could probably create an artifact (https://www.jetbrains.com/help/idea/working-with-artifacts.html) that does the copying for you (although I am not 100% sure).
b
@anton.bannykh Build | Build Artifacts is "greyed out" on my end, is it because I am using IntelliJ Community ed.?
a
@birgersp I think it is cause you have none. Project settings -> Artifacts -> green plus sign at the top
Then you click
other
, add your module compile output and set
Output directory
to the correct location.
b
Aha! Yes, now I managed to make IntelliJ copy my built script and the "kotlin.js" library script. Excellent! Thank you, sir!
a
Congrats!
b
@anton.bannykh Next question (related): The artifact is included in the project "build". But it is not included when the project is built automatically. Why, and is there a way to make the artifact included as a part of the automatic build?
@anton.bannykh?
Or would I have to create my own IntelliJ plugin for this?
You can make IDEA build artifacts before executing a run configuration. Not sure what you mean by an 'automatic build'
Also this might be relevant: https://stackoverflow.com/a/47121190
b
Also, you can change output directory for each module in project structure, and setup output directory for js files from libraries in the Kotlin compiler settings per project or in a facet per module.