Skip to content

Commit

Permalink
Updated New-ModuleDirStructure
Browse files Browse the repository at this point in the history
  • Loading branch information
codaamok committed Apr 10, 2022
1 parent 3ef3291 commit d9bcabc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/Public/Setup/New-ModuleDirStructure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ function New-ModuleDirStructure {
}

#Create the module and related files
$GitIgnorePath = Join-Path -Path $Path -ChildPath ".gitignore"
$GitIgnorePath = "{0}\.gitignore" -f $Path
$ModuleScript = "{0}.psm1" -f $ModuleName
$ModuleScriptPath = Join-Path -Path $Path -ChildPath $ModuleScript
$ModuleScriptPath = "{0}\src\{1}" -f $Path, $ModuleScript
$ModuleManifest = "{0}.psd1" -f $ModuleName
$ModuleManifestPath = Join-Path -Path $Path -ChildPath $ModuleManifest
$ModuleManifestPath = "{0}\src\{1}" -f $Path, $ModuleManifest
New-Item $ModuleManifestPath -ItemType File -Force
@(
'$Public = @( Get-ChildItem -Path $PSScriptRoot\Public -Recurse -Filter "*.ps1" )'
Expand All @@ -72,7 +72,7 @@ function New-ModuleDirStructure {
' }'
'}'
'Export-ModuleMember -Function $Public.Basename'
) | Set-Content -Path $ModuleManifestPath -Force
) | Set-Content -Path $ModuleScriptPath -Force
@(
'build/*'
'release/*'
Expand All @@ -84,7 +84,7 @@ function New-ModuleDirStructure {
New-Item $ModuleHelpPath -ItemType File -Force

$NewModuleManifestSplat = @{
Path = Join-Path -Path $Path -ChildPath 'src' | Join-Path -ChildPath $ModuleManifest
Path = $ModuleManifestPath
RootModule = $ModuleScript
Description = $Description
PowerShellVersion = $PowerShellVersion
Expand Down

0 comments on commit d9bcabc

Please sign in to comment.