PSTS.psm1
#if ( $(get-module |Where-Object {$_.Name -eq "psyaml"}) -eq $null) { import-module psyaml } if ($PSScriptRoot -eq $null) { $PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition } #$classOrder = Get-Content "$PSScriptRoot\models\classes.json" -Raw ` # | ConvertFrom-Json #ForEach ($classFile in $classOrder) { # Write-Verbose -Message "Importing from $classFile" # . "$PSScriptRoot\models\$classFile" #} $functionFolders = @('private', 'public') ForEach ($folder in $functionFolders) { $folderPath = Join-Path -Path $PSScriptRoot -ChildPath $folder If (Test-Path -Path $folderPath) { Write-Verbose -Message "Importing from $folder" $functions = Get-ChildItem -Path $folderPath -Filter '*.ps1' -Recurse ForEach ($function in $functions) { Write-Verbose -Message " Importing $($function.BaseName)" . $($function.FullName) } } } #$publicFunctions = (Get-ChildItem -Path "$PSScriptRoot\public" -Filter '*.ps1' -Recurse).BaseName #Export-ModuleMember -Function $publicFunctions |