pr-autoflow.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Dynamically populate the module
#
# NOTE:
# 1) Ignore any Pester test fixtures
#

# find all the functions that make-up this module
$functions = Get-ChildItem $PSScriptRoot/functions -Recurse -Include *.ps1 | `
                                Where-Object { $_ -notmatch ".Tests.ps1" }
                    
# dot source the individual scripts that make-up this module
foreach ($function in ($functions)) { . $function.FullName }

# export the non-private functions (by convention, private function scripts must begin with an '_' character)
Export-ModuleMember -function ( $functions | 
                                    ForEach-Object { (Get-Item $_).BaseName } | 
                                    Where-Object { -not $_.StartsWith("_") }
                            )