Skip to content

Commit

Permalink
Use implicit parameters where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
joeltimothyoh committed Jan 2, 2020
1 parent fddf22d commit 75fd460
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ScheduledTaskManagement/Public/Setup-ScheduledTask.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Setup-ScheduledTask {
if (!$DefinitionObject) {
$DefinitionCollectionRaw = $DefinitionFileCollection | % {
if ($AsJson) {
Get-Content -Path $_.FullName | ConvertFrom-Json
Get-Content $_.FullName | ConvertFrom-Json
}else {
. $_.FullName
}
Expand Down
6 changes: 3 additions & 3 deletions src/ScheduledTaskManagement/ScheduledTaskManagement.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ $script:MODULE['PRIVATE_DIR'] = Join-Path $script:MODULE['BASE_DIR'] 'Private'
$script:MODULE['HELPERS_DIR'] = Join-Path $script:MODULE['BASE_DIR'] 'helpers' # Module helpers

# Load vendor, Public, Private, classes, helpers
Get-ChildItem -Path "$($script:MODULE['PUBLIC_DIR'])\*.ps1" | % { . $_.FullName }
Get-ChildItem -Path "$($script:MODULE['PRIVATE_DIR'])\*.ps1" | % { . $_.FullName }
Get-ChildItem -Path "$($script:MODULE['HELPERS_DIR'])\*.ps1" | % { . $_.FullName }
Get-ChildItem "$($script:MODULE['PUBLIC_DIR'])\*.ps1" | % { . $_.FullName }
Get-ChildItem "$($script:MODULE['PRIVATE_DIR'])\*.ps1" | % { . $_.FullName }
Get-ChildItem "$($script:MODULE['HELPERS_DIR'])\*.ps1" | % { . $_.FullName }

# Export Public functions
Export-ModuleMember -Function (Get-ChildItem "$($script:MODULE['PUBLIC_DIR'])\*.ps1" | Select-Object -ExpandProperty BaseName)

0 comments on commit 75fd460

Please sign in to comment.