AU.psm1

1
2
3
4
5
6
7
8
9
10
11
# Export functions that start with capital letter, others are private
# Include file names that start with capital letters, ignore others

$pre = ls Function:\*
ls "$PSScriptRoot\*.ps1" | ? { $_.Name -cmatch '^[A-Z]+' } | % { . $_  }
$post = ls Function:\*
$funcs = compare $pre $post | select -Expand InputObject | select -Expand Name
$funcs | ? { $_ -cmatch '^[A-Z]+'} | % { Export-ModuleMember -Function $_ }

Export-ModuleMember -Alias *