Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio TypeScript Options

How do I tell the TypeScript compiler to generate amd modules (--module amd) from within Visual Studio.

Thanks.

like image 789
MBeckius Avatar asked Oct 03 '12 14:10

MBeckius


2 Answers

In your project file you will need to change the MSBuild target that is building TypeScript files. If you are using the default template for "HTML Application built with TypeScript", unload your project, edit the project file, you will find a target called "BeforeBuild" that is calling the compiler at "$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc", add --module amd to it; save and reload your project. next time you build you should see the command argument passed correctly to the compiler.

like image 185
mohamed hegazy Avatar answered Nov 10 '22 21:11

mohamed hegazy


On the latest Visual Studio 2013 Update 3 + WebEssentials the options are now (finally) properly moved in the Project Options Pane (Right click on the project -> Options -> TypeScript Build pane).

like image 8
MadLux Avatar answered Nov 10 '22 21:11

MadLux