使用PHPstorm自动编译TypeScript

IDEA系列支撑留存文件,使用自动编译,自动非常方便。编译免费创建邮箱但是使用我发觉,网上很多傻屌教程,自动都是编译拷贝的,根本就不能用了。使用这儿说一下无误的自动方法。

装配TypeScript

需要nodejs环境,编译免费创建邮箱这儿不赘述。使用

全局装配TypeScript

npm install -g <a target="_blank" href="https://www.kaiyuanyuanma.com/tag/996.html" title="View all posts in typescript">typescript</a> npm install -g <a target="_blank" href="https://www.kaiyuanyuanma.com/tag/996.html" title="View all posts in typescript">typescript</a> npm install -g typescript

配置PHPstorm

进入设置,自动找到File Watchers,编译添加一个自定义项目

用到的使用内容:

参数:$FileName$ --target "es5"

刷新参数:Output paths to refresh:$FileNameWithoutExtension$.js:$FileNameWithoutExtension$.js.map

内容看完了
皖ICP备2025077989号-141