-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(T4.BuildTools): evaluate T4Transform/T4Preprocess Metadata
- Loading branch information
Showing
26 changed files
with
461 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ng.Build.Tests/TestCases/PreprocessTemplateFromRelativePath/Nested/Template/Folder/foo.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<#@ template language="C#" #> | ||
Hello World |
14 changes: 14 additions & 0 deletions
14
...ts/TestCases/PreprocessTemplateFromRelativePath/PreprocessTemplateFromRelativePath.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<T4Preprocess Include="./Nested/Template/Folder/foo.tt" /> | ||
<PackageReference Include="System.CodeDom" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.targets" /> | ||
</Project> |
2 changes: 2 additions & 0 deletions
2
Mono.TextTemplating.Build.Tests/TestCases/PreprocessTemplateMetadata/OutputDirectory.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<#@ template language="C#" #> | ||
Hello Item Metadata OutputDirectory |
2 changes: 2 additions & 0 deletions
2
...ting.Build.Tests/TestCases/PreprocessTemplateMetadata/OutputDirectoryAndOutputFileName.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<#@ template language="C#" #> | ||
Hello Item Metadata OutputDirectory And OutputDFileName |
3 changes: 3 additions & 0 deletions
3
Mono.TextTemplating.Build.Tests/TestCases/PreprocessTemplateMetadata/OutputFileName.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<#@ template language="C#" #> | ||
<#@ output extension=".generated.cs" #> | ||
Hello Item Metadata OutputDFileName |
2 changes: 2 additions & 0 deletions
2
Mono.TextTemplating.Build.Tests/TestCases/PreprocessTemplateMetadata/OutputFilePath.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<#@ template language="C#" #> | ||
Hello Item Metadata OutputFilePath |
26 changes: 26 additions & 0 deletions
26
...lating.Build.Tests/TestCases/PreprocessTemplateMetadata/PreprocessTemplateMetadata.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<T4Preprocess Include="OutputDirectory.tt"> | ||
<OutputDirectory>Demo/Output</OutputDirectory> | ||
</T4Preprocess> | ||
<T4Preprocess Include="OutputFilePath.tt"> | ||
<OutputFilePath>Demo/LegacyOutput</OutputFilePath> | ||
</T4Preprocess> | ||
<T4Preprocess Include="OutputFileName.tt"> | ||
<OutputFileName>Demo/OutputFileNameTest.cs</OutputFileName> | ||
</T4Preprocess> | ||
<T4Preprocess Include="OutputDirectoryAndOutputFileName.tt"> | ||
<OutputDirectory>Demo/Output</OutputDirectory> | ||
<OutputFileName>OutputDirectoryAndFileNameTest.g.cs</OutputFileName> | ||
</T4Preprocess> | ||
<PackageReference Include="System.CodeDom" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.targets" /> | ||
</Project> |
14 changes: 14 additions & 0 deletions
14
...ld.Tests/TestCases/PreprocessTemplateWithExtension/PreprocessTemplateWithExtension.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<T4Preprocess Include="foo.tt" /> | ||
<PackageReference Include="System.CodeDom" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.targets" /> | ||
</Project> |
3 changes: 3 additions & 0 deletions
3
Mono.TextTemplating.Build.Tests/TestCases/PreprocessTemplateWithExtension/foo.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<#@ template language="C#" #> | ||
<#@ output extension=".g.cs" #> | ||
Hello World |
4 changes: 4 additions & 0 deletions
4
...ing.Build.Tests/TestCases/TransformTemplateFromRelativePath/Nested/Template/Folder/foo.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<#@ template language="C#" #> | ||
<#@ parameter name="Year" type="int" #> | ||
<#@ parameter name="Greeting" #> | ||
<#=Greeting#> <#=Year#>! |
15 changes: 15 additions & 0 deletions
15
...ests/TestCases/TransformTemplateFromRelativePath/TransformTemplateFromRelativePath.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<T4Transform Include="Nested\Template\Folder\foo.tt" /> | ||
<T4Argument Include="Greeting=Hello" /> | ||
<T4Argument Include="Year" Value="2024" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$(TemplatingTargetsPath)\T4.BuildTools.targets" /> | ||
</Project> |
4 changes: 4 additions & 0 deletions
4
Mono.TextTemplating.Build.Tests/TestCases/TransformTemplateMetadata/OutputDirectory.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<#@ template language="C#" #> | ||
<#@ parameter name="Year" type="int" #> | ||
<#@ parameter name="Greeting" #> | ||
<#=Greeting#> OutputDirectory <#=Year#>! |
4 changes: 4 additions & 0 deletions
4
...ating.Build.Tests/TestCases/TransformTemplateMetadata/OutputDirectoryAndOutputFileName.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<#@ template language="C#" #> | ||
<#@ parameter name="Year" type="int" #> | ||
<#@ parameter name="Greeting" #> | ||
<#=Greeting#> OutputDirectory and OutputFileName <#=Year#>! |
Oops, something went wrong.