从 chrome devtools 触发 typescript compile-on-save

Trigger typescript compile-on-save from chrome devtools

我正在使用 Chrome devtools(调试时)即时调试和编辑我的 .ts 文件。

这样做的一个主要缺点是,为了在关联的 .js 文件中反映 .ts 文件的更改,我必须切换回 Visual Studio,单击 "yes, reload" 并触发另一个保存每个修改过的文件(为了重建 js),然后我才能回到我的页面并 F5 它。

有没有办法告诉 VS(或 chrome,顺便说一下)在保存 TS 文件时自动编译它们?

编辑 我正在使用 chrome 工作区与磁盘同步文件

Is there a way to tell VS (or chrome, btw) to automatically compile TS files when they're saved ?

如果您使用 chrome 工作区,它将从磁盘而不是内存中加载 ts 文件。这样,当您保存文件时,它会保存到磁盘。这意味着您可以连接 https://github.com/TypeStrong/grunt-ts 之类的东西以在保存时进行编译以获得新的 JS,然后可以实时重新加载