Skip to content

Commit fdfe6db

Browse files
committed
fix: template symbols generate id and replace lower case module name
1 parent 6e2568f commit fdfe6db

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

src/Compendium.PowerShell/.template.config/template.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,28 @@
1111
"shortName": "powershell",
1212
"description": "PowerShell module setup.",
1313
"symbols": {
14-
"module-name": {
14+
"moduleId": {
15+
"type": "generated",
16+
"description": "Generate a new GUID for the PowerShell module.",
17+
"generator": "guid",
18+
"replaces": "moduleId"
19+
},
20+
"moduleName": {
1521
"type": "parameter",
1622
"description": "The module name.",
1723
"datatype": "text",
1824
"replaces": "Compendium",
1925
"fileRename": "Compendium"
26+
},
27+
"moduleNameLower": {
28+
"type": "generated",
29+
"description": "The parameterized module name in lower case.",
30+
"generator": "casing",
31+
"parameters": {
32+
"source": "moduleName",
33+
"toLower": true
34+
},
35+
"replaces": "compendium"
2036
}
2137
}
2238
}

src/Compendium.PowerShell/Compendium/Compendium.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ModuleVersion = '0.0.1'
1414
# CompatiblePSEditions = @()
1515

1616
# ID used to uniquely identify this module
17-
GUID = '00000000-0000-0000-0000-000000000000'
17+
GUID = 'moduleId'
1818

1919
# Author of this module
2020
Author = ''

src/Compendium.PowerShell/Compendium/Test/Find-Compendium.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ BeforeAll {
22
Import-Module -Name '../Compendium'
33

44
$script:nameToFind = 'Book1'
5-
$script:compendia = @(
5+
$script:collection = @(
66
[Compendium]::new($nameToFind, @('Book one.'))
77
[Compendium]::new('Book2', @('Book two.'))
88
)
@@ -11,7 +11,7 @@ BeforeAll {
1111
Describe 'Find-Compendium' {
1212
Context "Book1" {
1313
It "Given the name Book1, it finds the Compendium" {
14-
$result = $compendia | Find-Compendium -Name $nameToFind
14+
$result = $collection | Find-Compendium -Name $nameToFind
1515
$result.Count | Should -Be 1
1616
}
1717
}

0 commit comments

Comments
 (0)