Mineplex2018-withcommit/Website/packages/T4Scaffolding.1.0.6/tools/CustomScaffolder/DefaultPs1Script.ps1.t4

17 lines
880 B
Plaintext
Raw Normal View History

2013-08-27 17:14:08 +02:00
<#@ 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