Skip to content

Commit e6d2caa

Browse files
🩹 [Patch]: Improve markdown file output by sorting and displaying relative paths in Build-PSModuleDocumentation
1 parent e7afed1 commit e6d2caa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

β€Žscripts/helpers/Build-PSModuleDocumentation.ps1β€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
Write-Host '::group::Build docs - Generated files'
7676
Get-ChildItem -Path $docsOutputFolder -Recurse | Select-Object -ExpandProperty FullName
7777

78-
Get-ChildItem -Path $docsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object {
79-
$fileName = $_.Name
80-
Write-Host "::group:: - [$fileName]"
78+
Get-ChildItem -Path $docsOutputFolder -Recurse -Force -Include '*.md' | Sort-Object FullName | ForEach-Object {
79+
$relPath = [System.IO.Path]::GetRelativePath($docsOutputFolder, $_.FullName)
80+
Write-Host "::group:: - [$relPath]"
8181
Show-FileContent -Path $_
8282
}
8383

@@ -151,8 +151,8 @@
151151
$null = New-Item -Path $docsFolderPath -ItemType Directory -Force
152152
Move-Item -Path $file.FullName -Destination $docsFilePath -Force
153153
}
154-
Write-Host "::endgroup::"
155-
154+
Write-Host '::endgroup::'
155+
156156
Write-Host '────────────────────────────────────────────────────────────────────────────────'
157157
Get-ChildItem -Path $docsOutputFolder -Recurse -Force -Include '*.md' | Sort-Object FullName | ForEach-Object {
158158
$relPath = [System.IO.Path]::GetRelativePath($docsOutputFolder, $_.FullName)

0 commit comments

Comments
Β (0)