Catesta
Catesta copied to clipboard
Add functionality for automating the substitution of public functions into the manifest
It has been suggested in both #69 and #97 that Catesta should automate the process of populating public functions into the .psd1 manifest.
One proposed solution is to add a build task for this:
#Updates the array for FunctionsToExport in the module manifest
Add-BuildTask UpdateFunctionsToExport -Before TestModuleManifest {
Write-Build White ' Running module manifest update FuctionsToExport...'
$publicFunctionPath = Join-Path -Path $script:ModuleSourcePath -ChildPath 'Public'
$publicFunctions = Get-ChildItem -Path $publicFunctionPath -Filter '*.ps1' -Recurse
Update-ModuleManifest -Path $script:ModuleManifestFile -FunctionsToExport $publicFunctions.BaseName
Write-Build Green ' ...Module Manifest Update FunctionsToExport Complete!'
} #UpdateFunctionsToExport
I'd like some community feedback on this change. Are there situations where this would not be desirable?