Skip to content

Commit

Permalink
Adds support for Cmdlets
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Feb 18, 2024
1 parent bf1f2ca commit 045a711
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Private/New-PersonalManifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function New-PersonalManifest {
[switch] $AddUsingsToProcess,
[string] $ScriptsToProcessLibrary,
[switch] $UseWildcardForFunctions,
[switch] $OnMerge
[switch] $OnMerge,
[string[]] $BinaryModule
)

$TemporaryManifest = [ordered] @{ }
Expand Down Expand Up @@ -77,10 +78,10 @@ function New-PersonalManifest {
Write-Text -Text '[-] Native PSD1 style is not available when using PreRelease or ExternalModuleDependencies. Switching to Minimal.' -Color Yellow
}
#if ($Data.ScriptsToProcess.Count -eq 0) {
#$Data.Remove('ScriptsToProcess')
#$Data.Remove('ScriptsToProcess')
#}
#if ($Data.CmdletsToExport.Count -eq 0) {
# $Data.Remove('CmdletsToExport')
# $Data.Remove('CmdletsToExport')
#}
$Data = $Manifest
$Data.PrivateData = @{
Expand Down Expand Up @@ -152,6 +153,12 @@ function New-PersonalManifest {
if (-not $Data.RequiredModules) {
$Data.Remove('RequiredModules')
}
# we export all cmdlets until we have a better way to handle this
# if module is hybrid (binary + script we need to ddo this)
if ($BinaryModule.Count -gt 0) {
#$Data.NestedModules = @($BinaryModule)
$Data.CmdletsToExport = @("*")
}
$Data | Export-PSData -DataFile $ManifestPath -Sort
}
}

0 comments on commit 045a711

Please sign in to comment.