File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ catch {
1313 throw
1414}
1515
16- ' platyPS' , ' PoshRSJob ' | ForEach-Object {
16+ ' platyPS' | ForEach-Object {
1717 Write-Host " [$_ ] Resolving module"
1818 Install-Module $_ - Repository PSGallery - Scope CurrentUser - ErrorAction SilentlyContinue
1919 Import-Module $_
@@ -35,13 +35,14 @@ Get-ChildItem "$($docsPath)/docs/glossary" -Exclude "index.md" | Remove-Item -Fo
3535
3636$vsCommands = (Get-ChildItem " $ ( $basePath ) /VaporShell/Public" - Filter ' *.ps1' - Recurse).BaseName
3737
38- Write-Host - ForegroundColor Green " Starting runspaces to build the updated docs"
39- $vsCommands | Start-RSJob - Name {$_ } - ModulesToImport platyPS, " $basePath \BuildOutput\VaporShell" - VariablesToImport docsPath - ScriptBlock {
38+ Write-Host - ForegroundColor Green " Starting parallel processing to build the updated docs"
39+ $vsCommands | ForEach-Object - Parallel {
40+ $docsPath = $using :docsPath
41+ Import-Module platyPS
42+ Import-Module " $using :basePath \BuildOutput\VaporShell"
4043 Write-Host " Working on: $ ( $_ ) "
4144 New-MarkdownHelp - Command " VaporShell\$_ " - Force - NoMetadata - OutputFolder " $ ( $docsPath ) \docs\glossary"
42- } | Wait-RSJob | Receive-RSJob
43-
44- Get-RSJob | Remove-RSJob
45+ } - ThrottleLimit 10
4546
4647$files = Get-ChildItem " $ ( $docsPath ) /docs/glossary" - Exclude " index.md"
4748
You can’t perform that action at this time.
0 commit comments