【发布时间】:2017-05-24 13:15:15
【问题描述】:
微软fixed an issue with Typescript still generating JS compiled output in TS 2.0 even though the source file was deleted。所涉及的解决方案是使用文件观察器触发删除回调事件并从源文件列表中删除tsc watch 文件。
当源文件被删除时,我们不能同时删除目标输出文件有什么原因吗?当你在重构函数/ JS 类型碰撞并造成崩溃时,这会产生问题。
add a tsconfig compiler option 还删除目标(.js.map、.js)以使tsc -watch 不需要用户连续停止/启动或use gulp to clean the output directory,这不是微不足道吗?您可以轻松地使用 glob 模式来识别目标输出。
【问题讨论】:
标签: typescript gulp tsconfig file-watcher