Mineplex2018-withcommit/Website/packages/T4Scaffolding.1.0.6/tools/CustomScaffolder/DefaultPs1Script.ps1.t4
Jonathan Williams 3fb52c5c71 Initial Commit
2013-08-27 08:14:08 -07:00

17 lines
880 B
Plaintext

<#@ template language="C#" HostSpecific="True" inherits="DynamicTransform" #>
<#@ Output Extension="ps1" #>
[T4Scaffolding.Scaffolder(Description = "Enter a description of <#= Model.Scaffolder #> here")][CmdletBinding()]
param(
[string]$Project,
[string]$CodeLanguage,
[string[]]$TemplateFolders,
[switch]$Force = $false
)
$outputPath = "ExampleOutput" # The filename extension will be added based on the template's <#= "<" #>#@ Output Extension="..." #<#= ">" #> directive
$namespace = (Get-Project $Project).Properties.Item("DefaultNamespace").Value
Add-ProjectItemViaTemplate $outputPath -Template <#= Model.TemplateName #> `
-Model @{ Namespace = $namespace; ExampleValue = "Hello, world!" } `
-SuccessMessage "Added <#= Model.Scaffolder #> output at {0}" `
-TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -Force:$Force