简体   繁体   中英

How can I have TypeScript build only on save in Visual Studio

When I build the project, it is redundantly building script event though I have script compiling on run/debug. Is there a way to make it only build on save?

If you have installed Web Essentials 2012 extension it is very easy.

In Visual Studio go to Tools -> Options -> Select Web Essentials, Under the TypeScript set "Compile TypeScript on Save" to True

在此处输入图片说明

You can set the build type to none and saving the .ts file will still build the .js file. However, the .js file does not get checked in to TFS so when someone gets the project, they would have to open and save every file. This seems to be another issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM