Skip to content

Instantly share code, notes, and snippets.

@danabenson
Created March 22, 2013 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danabenson/5224718 to your computer and use it in GitHub Desktop.
Save danabenson/5224718 to your computer and use it in GitHub Desktop.
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
<#@ output extension=".tsproj" #>
-out app.js
<#
string dirPath = this.Host.ResolvePath("");
string[] tsFiles = Directory.GetFiles(dirPath, "*.ts", SearchOption.AllDirectories);
//used by the TypeScript compiler to generate the application javascript
//we have to do our own dependency ordering :(
//http://stackoverflow.com/questions/14287954/compiling-multiple-typescript-files/14288752#14288752
//ordering is determined by _references.ts (even if we don't output it to this file because every ts file references it)
foreach (var tsFile in tsFiles)
{
#>
<#= tsFile #>
<# } #>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment