Skip to content

Commit 47339ec

Browse files
author
Friedrich Weinmann
committed
finalizing templates
1 parent ec95224 commit 47339ec

File tree

11 files changed

+448
-13
lines changed

11 files changed

+448
-13
lines changed

PSModuleDevelopment/PSModuleDevelopment.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# Modules that must be imported into the global environment prior to importing
4343
# this module
44-
RequiredModules = @(@{ ModuleName='PSFramework'; ModuleVersion= '0.9.9.19' })
44+
RequiredModules = @(@{ ModuleName='PSFramework'; ModuleVersion= '0.9.10.23' })
4545

4646
# Assemblies that must be loaded prior to importing this module
4747
RequiredAssemblies = @('bin\PSModuleDevelopment.dll')

PSModuleDevelopment/PSModuleDevelopment.psm1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ function Import-PSMDFile
3838
# Perform Actions before loading the rest of the content
3939
. Import-PSMDFile -Path "$PSModuleRoot\internal\scripts\preload.ps1"
4040

41+
#region Load internal functions
42+
foreach ($function in (Get-ChildItem "$PSModuleRoot\internal\functions" -Recurse -File -Filter "*.ps1"))
43+
{
44+
. Import-PSMDFile -Path $function.FullName
45+
}
46+
#endregion Load internal functions
47+
4148
#region Load functions
4249
foreach ($function in (Get-ChildItem "$PSModuleRoot\functions" -Recurse -File -Filter "*.ps1"))
4350
{
0 Bytes
Binary file not shown.
Binary file not shown.

PSModuleDevelopment/bin/PSModuleDevelopment.xml

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PSModuleDevelopment/functions/templating/Get-PSMDTemplate.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@
102102
$prospects += $data
103103
}
104104
}
105+
#endregion Scan folders
105106

107+
#region Search Stores
106108
else
107109
{
108110
$stores = Get-PsmdTemplateStore -Filter $Store
@@ -111,12 +113,12 @@
111113
{
112114
if ($item.Ensure())
113115
{
114-
$templateInfos = Get-ChildItem -Path $item.Path -Filter "$($TemplateName)-*.Info.xml" | Where-Object { ($_.Name -replace "-\d+(\.\d+){0,3}.Info.xml$") -like $TemplateName }
116+
$templateInfos = Get-ChildItem -Path $item.Path -Filter "$($TemplateName)-*-Info.xml" | Where-Object { ($_.Name -replace "-\d+(\.\d+){0,3}-Info.xml$") -like $TemplateName }
115117

116118
foreach ($info in $templateInfos)
117119
{
118120
$data = Import-Clixml $info.FullName
119-
$data.Path = $info.FullName -replace '\.Info\.xml$', '.xml'
121+
$data.Path = $info.FullName -replace '-Info\.xml$', '.xml'
120122
$data.Store = $item.Name
121123
$prospects += $data
122124
}
@@ -129,7 +131,7 @@
129131
}
130132
}
131133
}
132-
#endregion Scan folders
134+
#endregion Search Stores
133135
}
134136
end
135137
{

0 commit comments

Comments
 (0)