Saturday 11 March 2017

How can I launch node to run a .ts file from intellij?

I have a project set up with intellij IDEA happily compiling .ts typescript files to .js ES6 files. The .js files are being dumped neatly next to the .ts files.

directory tree

I'd like to the able to run the .ts files in node.js just like I can with the .js files. Eg using CMD+SHIFT+F10 on .ts intellij will launch node .js (after running the typescript compiler). After each file edit it feels awkward having to remember to open the .js version before running the file I just edited.

The equivalent experience for a java programmer would be navigating to the .class version of a unit test to execute the edited .java file.

Is this just a missing feature in intellij/webstorm or am I missing something?



via aussie1984

No comments:

Post a Comment