Skip to content

Instantly share code, notes, and snippets.

@markrendle
Created October 2, 2012 11:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markrendle/3818423 to your computer and use it in GitHub Desktop.
Save markrendle/3818423 to your computer and use it in GitHub Desktop.
Visual Studio project bits for TypeScript compilation
<ItemGroup>
<TypeScriptCompile Include="$(ProjectDir)\**\*.ts" />
</ItemGroup>
<Target Name="BeforeBuild">
<Exec Command="&quot;$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc&quot; -target ES5 @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />
</Target>
@markrendle
Copy link
Author

Add this code to the bottom of your csproj or jsproj file to get TypeScript files compiled as part of build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment