document.writeln('');
IDEA系列支持保存文件,自動編譯,非常方便。但是我發(fā)現(xiàn),網(wǎng)上很多傻屌教程,都是復(fù)制的,根本就不能用了。這兒說一下正確的方法。
需要nodejs環(huán)境,這兒不贅述。
全局安裝TypeScript
npm install -g <a target="_blank" href="https://123vo.cn/tag/996.html" title="View all posts in typescript">typescript</a>npm install -g <a target="_blank" title="View all posts in typescript">typescript</a>npm install -g typescript
進(jìn)入設(shè)置,找到File Watchers,添加一個自定義項(xiàng)目
用到的內(nèi)容:
參數(shù):$FileName$ --target "es5"
刷新參數(shù):Output paths to refresh:$FileNameWithoutExtension$.js:$FileNameWithoutExtension$.js.map