SportsbookXray.psm1
# Export only the functions using PowerShell standard verb-noun naming. # Be sure to list each exported functions in the FunctionsToExport field of the module manifest file. # This improves performance of command discovery in PowerShell. #Export-ModuleMember -Function *-* #Get public and private function definition files. #$Classes = @( Get-ChildItem -Path $PSScriptRoot\classes\*.ps1 -ErrorAction SilentlyContinue ) $Public = @( Get-ChildItem -Path $PSScriptRoot\public\*.ps1 -Recurse -ErrorAction SilentlyContinue ) $Private = @( Get-ChildItem -Path $PSScriptRoot\private\*.ps1 -Recurse -ErrorAction SilentlyContinue ) Import-LocalizedData -BindingVariable LocalizedData -BaseDirectory $PSScriptRoot\other\resources -FileName SportsbookXray.Resources.psd1 #Dot source the files Foreach($import in @($Private + $Public)) { Try { . $import.fullname } Catch { Write-Error -Message "Failed to import function $($import.fullname): $_" } } # Here I might... # Read in or create an initial config file and variable # Export Public functions ($Public.BaseName) for WIP modules # Set variables visible to the module and its functions only Export-ModuleMember -Function * -Alias * |