-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructuredResource.psm1
More file actions
38 lines (31 loc) · 924 Bytes
/
StructuredResource.psm1
File metadata and controls
38 lines (31 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$moduleRoot = Split-Path -Path $MyInvocation.MyCommand.Path
# load the metaprogramming files...
"$moduleRoot\Functions\*.meta.ps1" |
Get-Item |
% { . $_.FullName }
# load the type files...
. "$moduleRoot\Functions\LoadTypes.ps1"
# ...and then the remaining .ps1 files
"$moduleRoot\Functions\*.ps1",
"$moduleRoot\TestResourceFunctions\*.ps1",
"$moduleRoot\External\*.ps1" |
Get-Item |
? {
$_.Name -notmatch 'Tests\.ps1$' -and
$_.Name -notmatch 'Types?\.ps1$'
} |
% { . $_.FullName }
# dot source the .ps1 files
"$moduleRoot\Functions\*.ps1" |
Get-Item |
? { $_.Name -notmatch 'Tests\.ps1$' } |
% { . $_.FullName }
# export public functions
Export-ModuleMember @(
'New-StructuredResourceArgs'
'Assert-StructuredResourceArgs'
'Invoke-StructuredResource'
'New-StructuredResourceTest'
'Invoke-StructuredResourceTest'
)
$ErrorActionPreference = 'Stop'