Compile on save
ghivert opened this issue · comments
Hi and thanks for the hard work!
I'm wondering on one point, in tsconfig.json
, we have a field name compileOnSave
which should automatically compile all TS files which are just saved.
Is there any plan for the LSP to support this out-of-the-box (respecting the user choice in tsconfig.json
) ?
Thanks!
What would you expect the effect of this setting be?
Is it about getting project-wide diagnostics? In that case we have #73 for that.
compileOnSave
seems to require some extra code to support it and it's not very clear what its purpose. Also it seems to be only supported by a handful of IDEs (and not even VSCode).
Sorry, didn't see your answer!
Effectively, compileOnSave
flag seems like an artifact of the past. I think it would be too much work for nothing really in the end.
To answer your question, once the flag is set, the editor triggers a tsc
command on the specific file which just have been saved. The idea is to potentially emit a specific file after each save, just like a tsc -w
would do, by emitting only a specific file after a save, and not triggering a compilation of the whole project.
I close the issue, because I think it's not an issue anymore (and I ended up with a tsc -w
in a concurrently
script to get it working, so not much an issue for me).
Thanks again for the hard work!