PSWordCloud.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$script:ModuleRoot = $PSScriptRoot
Write-Verbose "PSWordCloud module root: $script:ModuleRoot"

# PowerShell Core uses System.Drawing.Common assembly instead of System.Drawing
if ($PSEdition -eq 'Core') {
    Write-Verbose 'Importing necessary types.'
    Add-Type -AssemblyName 'System.Drawing.Common'
}
else {
    Write-Verbose 'Importing necessary types.'
    Add-Type -AssemblyName 'System.Drawing'
}

$PublicFunctions = Get-ChildItem "$script:ModuleRoot\Public"
$PrivateFunctions = Get-ChildItem "$script:ModuleRoot\Private"

foreach ($Function in @($PublicFunctions) + @($PrivateFunctions)) {
    Write-Verbose "Importing functions from file: [$($Function.Name)]"
    . $Function.Fullname
}

Export-ModuleMember -Function $PublicFunctions.BaseName