I would like to keep modules clean, meaning putting functions in its own folder within the PS2018 project. When I try to add them into the manifest (FunctionsToExport) section, they disappear after building the module. I use this code in the .psm1 file figuring it would load them. Am I doing something incorrect or in the wrong order?
Any help would be appreciated.
- $FunctionsToExport = ( Get-ChildItem $PSScriptRoot\Functions\*.ps1 )
- foreach ($function in $FunctionsToExport)
- {
- $function
- . $function.FullName
- }