Skip to content

Instantly share code, notes, and snippets.

@ThatRendle
Created October 2, 2012 11:48
Show Gist options
  • Save ThatRendle/3818423 to your computer and use it in GitHub Desktop.
Save ThatRendle/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>
@ThatRendle
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