Webstorm自动编译TypeScript设置

1. 打开WebStorm,找到File->Setting->File Watchers,默认情况下是空的,点击右侧的“+”号,选择<custom>:

2. 新建Watcher,名字为TypeScript,File type 选择“TypeScript”,Program为nodejs下tsc.cmd文件,Arguments为--target "ES5",Output paths to refresh 为 $FileNameWithoutExtension$.js,点击“ok”按钮。如下图所示:

3.选中“TypeScript”前面的“Enabled”,点击“ok”。

 

posted @ 2018-11-02 14:12  羽今  阅读(5188)  评论(3编辑  收藏  举报