For someone that’s only using the community editio...
# javascript
n
For someone that’s only using the community edition of Intellij for a personal project, what’s the best way to write a Kotlin/JS project that can utilize a nice REPL style? My first thought was to try and run the code via node.js during development/debugging, but that doesn’t seem like it’s an option? My next thought was to just build it as a multiplatform jvm/js project, and just run the jvm version during development, and deploy the js at the end? Is there a better way, given I don’t actually want to target the jvm? ^^
a
What is an example of something you are trying to do, regarding REPL style? I would have recommended a scratch file which sounds like it would do that but couldn't get it working myself, at least with using code in the current project which is probably what you want.
n
Yeah, I’m not sure. The project is something that takes a file as input and applies a bunch of transforms to it, and then gives it back to the user.
“For real” the user will pick it and this should all happen on the client side, but the transforms are a bit complex, so being able to run it over and over to check things is important to me.
(It’s currently written in Python, which works, but is hosted on a server at the moment. I like the idea of being able to use Kotlin/JS and bringing it to be local)
a
some of that sounds like a good candidate for unit tests. Are you looking for something like a command line that inputs the file you specify and shows the output of the conversion?
n
At a high level, yes. The end-to-end output is rather complex, and so another piece of software is used to verify it.
So yes, individual parts could be in unit tests, but an integration test would (or feels at least) like it would be really difficult for me to write, which is why I just create the file and then open it in the other app