Skip to content

Commit 807af25

Browse files
authored
Merge pull request #133 from lipkau/fix/132-CompilePSM1
Added regions in psm1 file for compilation
2 parents a524399 + 694c077 commit 807af25

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ConfluencePS.build.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ task CompileModule {
273273
}
274274
if (($capture -eq $true) -and ($line -match "^#endregion")) {
275275
$capture = $false
276+
$compiled += "$line`n`n"
276277
}
277278

278279
if ($capture) {

ConfluencePS/ConfluencePS.psm1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#region Dependencies
12
# Load the ConfluencePS namespace from C#
23
if (!("ConfluencePS.Space" -as [Type])) {
34
Add-Type -Path (Join-Path $PSScriptRoot ConfluencePS.Types.cs) -ReferencedAssemblies Microsoft.CSharp, Microsoft.PowerShell.Commands.Utility, System.Management.Automation
@@ -8,8 +9,9 @@ if (!("ConfluencePS.Space" -as [Type])) {
89
if (!("System.Web.HttpUtility" -as [Type])) {
910
Add-Type -Assembly System.Web
1011
}
12+
#endregion Dependencies
1113

12-
# Gather all files
14+
#region LoadFunctions
1315
$PublicFunctions = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue )
1416
$PrivateFunctions = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue )
1517

@@ -29,3 +31,4 @@ ForEach ($File in @($PublicFunctions + $PrivateFunctions)) {
2931
$PSCmdlet.ThrowTerminatingError($errorItem)
3032
}
3133
}
34+
#endregion LoadFunctions

0 commit comments

Comments
 (0)