t4 multiple output sample

<#@ output extension=".js" #>
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ include file="C:\Documents\Manager.ttinclude" #>
<# var manager = Manager.Create(Host, GenerationEnvironment); #>

<# 
	var a=new string[]{"a","b"};
    for (int i = 0; i < a.Length; i++)
    {
			 
    manager.StartNewFile(a[i]+".js");

 #>
 <#= a[i] #>how






<# 
	
		}
	manager.Process(true);
 #>

  

posted @ 2016-07-08 12:19  calochCN  阅读(159)  评论(0编辑  收藏  举报