Skip to content

Commit 4168d57

Browse files
author
Friedrich Weinmann
committed
Fixed help, updated PSSA
1 parent a6c2eec commit 4168d57

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

PSModuleDevelopment/functions/templating/Invoke-PSMDTemplate.ps1

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
.DESCRIPTION
88
This function takes a template and turns it into a finished file&folder structure.
99
It does so by creating the files and folders stored within, replacing all parameters specified with values provided by the user.
10-
10+
1111
Missing parameters will be prompted for.
1212
1313
.PARAMETER Template
@@ -38,29 +38,32 @@
3838
Skip automatic folder creation for project templates.
3939
By default, this command will create a folder to place files&folders in when creating a project.
4040
41-
.PARAMETER Force
42-
If the target path the template should be written to (filename or folder name within $OutPath), then overwrite it.
43-
By default, this function will fail if an overwrite is required.
41+
.PARAMETER Parameters
42+
A Hashtable containing parameters for use in creating the template.
4443
4544
.PARAMETER Raw
4645
By default, all parameters will be replaced during invocation.
4746
In Raw mode, this is skipped, reproducing mostly the original template input (dynamic scriptblocks will now be named scriptblocks)).
4847
48+
.PARAMETER Force
49+
If the target path the template should be written to (filename or folder name within $OutPath), then overwrite it.
50+
By default, this function will fail if an overwrite is required.
51+
4952
.PARAMETER Silent
5053
This places the function in unattended mode, causing it to error on anything requiring direct user input.
5154
5255
.PARAMETER EnableException
53-
Replaces user friendly yellow warnings with bloody red exceptions of doom!
54-
Use this if you want the function to throw terminating errors you want to catch.
56+
Replaces user friendly yellow warnings with bloody red exceptions of doom!
57+
Use this if you want the function to throw terminating errors you want to catch.
5558
5659
.EXAMPLE
5760
PS C:\> Invoke-PSMDTemplate -TemplateName "module"
58-
61+
5962
Creates a project based on the module template in the current folder, asking for all details.
6063
6164
.EXAMPLE
6265
PS C:\> Invoke-PSMDTemplate -TemplateName "module" -Name "MyModule"
63-
66+
6467
Creates a project based on the module template with the name "MyModule"
6568
#>
6669
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")]
@@ -158,6 +161,7 @@
158161
#region Helper function
159162
function Invoke-Template
160163
{
164+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")]
161165
[CmdletBinding()]
162166
param (
163167
[PSModuleDevelopment.Template.TemplateInfo]
@@ -308,6 +312,7 @@
308312

309313
function Write-TemplateItem
310314
{
315+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")]
311316
[CmdletBinding()]
312317
param (
313318
[PSModuleDevelopment.Template.TemplateItemBase]

PSModuleDevelopment/functions/templating/New-PSMDTemplate.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@
8383
.PARAMETER Version
8484
The version of the template.
8585
86+
.PARAMETER Author
87+
The author of the template.
88+
89+
.PARAMETER Description.
90+
A description text for the template itself.
91+
This will be visible to the user before invoking the template and should describe what this template is for.
92+
8693
.PARAMETER Tags
8794
Tags to apply to the template, making it easier to filter & search.
8895

0 commit comments

Comments
 (0)