Is there any way to force Sublime text 3 to compile Typescript code on save? It's a bit annoying switching back and forth between terminal and Sublime. Thanks!
I don't know how to do it on save but you can do it by clicking ctrl+b. In order to make it work do this:
copy and paste the following:
{
"cmd": ["tsc","$file"],
"file_regex": "(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$",
"selector": "source.ts",
"windows": {
"cmd": ["tsc.cmd", "$file"]
}
}
save it as "myTypeScript.sublime-build"
Tools->Build System and choose the build system that you just created "myTypeScript.sublime-build"
every time you want to compile just click on ctrl+b
You can see seome explanation about it and more here