Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript compile on save with Visual Studio 2013?

I can't get Compile-on-Save to work with VS2013. I installed VS2013, reinstalled TS 0.9.0.1, and under "Tools", "Options", Typescript/Project/General, I've checked both of the "Compile on save" options. But when I add a new TS file to my project, and then edit it and save it, the changes aren't reflected in the associated .js file.

Am I doing something wrong? Is anybody else having this problem?

like image 571
Ken Smith Avatar asked Jul 17 '13 22:07

Ken Smith


People also ask

Does TypeScript compile save?

To Enable Compile on save feature, we first need to create the Typescript Configuration file tsconfig. json . The tsconfig. json is the file where TypeScript Compiler looks for project configuration and compiler options.

How do I compile TypeScript automatically?

Another way of automating the TypeScript compilation is by using command line interface or the Command Prompt. The second way is pretty simple to achieve; we just need to write a single line to watch any changes in our TypeScript file.

How do you save a TypeScript?

For example, for TypeScript 3.6. 0, you would use npm install --save-dev [email protected] . To preview the next version of TypeScript, run npm install --save-dev typescript@next .


1 Answers

This solved the problem for me:

  1. Go to Options under the Tools menu.
  2. Expand options for Text Editor
  3. Expand options for TypeScript
  4. Expand options for Project
  5. Check “Automatically compile TypeScript file which are not part of the project”
like image 152
Daniel Avatar answered Oct 05 '22 00:10

Daniel