Skip to content

Commit

Permalink
Merge pull request #56 from theohbrothers/enhancement/module-simplify…
Browse files Browse the repository at this point in the history
…-and-improve-documentation-in-script-module-file

Enhancement (module): Simplify and improve documentation in script module file
  • Loading branch information
joeltimothyoh committed May 12, 2024
2 parents abfc91d + 15bf1da commit 1feaa4f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/PSModulePublisher/PSModulePublisher.psm1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
$script:MODULE_BASE_DIR = Split-Path $MyInvocation.MyCommand.Path -Parent
$script:MODULE_PRIVATE_DIR = Join-Path $MODULE_BASE_DIR 'Private'
$script:MODULE_PUBLIC_DIR = Join-Path $MODULE_BASE_DIR 'Public'
Set-StrictMode -Version Latest

Get-ChildItem "$script:MODULE_PRIVATE_DIR/*.ps1" -exclude *.Tests.ps1 | % {
. $_.FullName
}
# Initialize variables
$MODULE_BASE_DIR = $PSScriptRoot
$MODULE_PRIVATE_DIR = Join-Path $MODULE_BASE_DIR 'Private'
$MODULE_PUBLIC_DIR = Join-Path $MODULE_BASE_DIR 'Public'

Get-ChildItem "$script:MODULE_PUBLIC_DIR/*.ps1" -exclude *.Tests.ps1 | % {
. $_.FullName
}
# Load functions
Get-ChildItem "$MODULE_PRIVATE_DIR\*.ps1" -exclude *.Tests.ps1 | % { . $_.FullName }
Get-ChildItem "$MODULE_PUBLIC_DIR\*.ps1" -exclude *.Tests.ps1 | % { . $_.FullName }

Export-ModuleMember -Function (Get-ChildItem "$script:MODULE_PUBLIC_DIR\*.ps1" | Select-Object -ExpandProperty BaseName)
# Export functions
Export-ModuleMember -Function (Get-ChildItem "$MODULE_PUBLIC_DIR\*.ps1" | Select-Object -ExpandProperty BaseName)

0 comments on commit 1feaa4f

Please sign in to comment.