1313param (
1414 # Path to the module source folder. Defaults to <repo>/src.
1515 [Parameter ()]
16- [string ] $SourcePath = (Join-Path $PSScriptRoot ' ..' ' .. ' ' src' ),
16+ [string ] $SourcePath = (Join-Path - Path $PSScriptRoot - ChildPath ' ..\..\ src' ),
1717
1818 # Folder in which the 'Sodium' module folder is created.
1919 [Parameter (Mandatory )]
@@ -37,31 +37,31 @@ New-Item -ItemType Directory -Path $moduleDir -Force | Out-Null
3737$sb = [System.Text.StringBuilder ]::new()
3838$publicFunctions = @ ()
3939
40- foreach ($file in (Get-ChildItem (Join-Path $SourcePath ' variables ' ' private' ) - Filter * .ps1 - ErrorAction SilentlyContinue)) {
40+ foreach ($file in (Get-ChildItem (Join-Path - Path $SourcePath - ChildPath ' variables\ private' ) - Filter * .ps1 - ErrorAction SilentlyContinue)) {
4141 [void ]$sb.AppendLine ((Get-Content $file.FullName - Raw))
4242}
43- foreach ($file in (Get-ChildItem (Join-Path $SourcePath ' functions ' ' private' ) - Filter * .ps1)) {
43+ foreach ($file in (Get-ChildItem (Join-Path - Path $SourcePath - ChildPath ' functions\ private' ) - Filter * .ps1)) {
4444 [void ]$sb.AppendLine ((Get-Content $file.FullName - Raw))
4545}
46- foreach ($file in (Get-ChildItem (Join-Path $SourcePath ' functions ' ' public' ) - Filter * .ps1)) {
46+ foreach ($file in (Get-ChildItem (Join-Path - Path $SourcePath - ChildPath ' functions\ public' ) - Filter * .ps1)) {
4747 [void ]$sb.AppendLine ((Get-Content $file.FullName - Raw))
4848 $publicFunctions += $file.BaseName
4949}
50- $mainPath = Join-Path $SourcePath ' main.ps1'
50+ $mainPath = Join-Path - Path $SourcePath - ChildPath ' main.ps1'
5151if (Test-Path $mainPath ) {
5252 [void ]$sb.AppendLine ((Get-Content $mainPath - Raw))
5353}
5454[void ]$sb.AppendLine (" Export-ModuleMember -Function '$ ( $publicFunctions -join " ', '" ) ' -Alias '*'" )
5555
56- Set-Content - Path (Join-Path $moduleDir ' Sodium.psm1' ) - Value $sb.ToString () - Encoding UTF8BOM
56+ Set-Content - Path (Join-Path - Path $moduleDir - ChildPath ' Sodium.psm1' ) - Value $sb.ToString () - Encoding UTF8BOM
5757
58- Copy-Item - Path (Join-Path $SourcePath ' libs' ) - Destination $moduleDir - Recurse
58+ Copy-Item - Path (Join-Path - Path $SourcePath - ChildPath ' libs' ) - Destination $moduleDir - Recurse
5959
60- New-ModuleManifest - Path (Join-Path $moduleDir ' Sodium.psd1' ) `
60+ New-ModuleManifest - Path (Join-Path - Path $moduleDir - ChildPath ' Sodium.psd1' ) `
6161 - RootModule ' Sodium.psm1' `
6262 - ModuleVersion ' 999.0.0' `
6363 - FunctionsToExport $publicFunctions `
6464 - CmdletsToExport @ () - VariablesToExport @ () - AliasesToExport @ ()
6565
6666Write-Verbose " Built module at $moduleDir " - Verbose
67- Join-Path $moduleDir ' Sodium.psd1'
67+ Join-Path - Path $moduleDir - ChildPath ' Sodium.psd1'
0 commit comments