File tree Expand file tree Collapse file tree 1 file changed +25
-8
lines changed
Expand file tree Collapse file tree 1 file changed +25
-8
lines changed Original file line number Diff line number Diff line change 4747
4848 Write-Host ' ::group::Build docs - Generate markdown help - Raw'
4949 Install-PSModule - Path $ModuleOutputFolder
50- Import-Module - Name $ModuleName - Force - Verbose
51- $moduleInfo = Get-Module $ModuleName
52- Write-Host $moduleInfo
53- $DebugPreference = ' Continue'
54- $VerbosePreference = ' Continue'
55- New-MarkdownCommandHelp - ModuleInfo $moduleInfo - OutputFolder $DocsOutputFolder - Force - Verbose - Debug
56- $DebugPreference = ' SilentlyContinue'
57- $VerbosePreference = ' SilentlyContinue'
50+ $moduleInfo = Import-Module - Name $ModuleName - Force - PassThru
51+
52+ # Get all exported commands from the module
53+ $commands = $moduleInfo.ExportedCommands.Values | Where-Object { $_.CommandType -ne ' Alias' }
54+
55+ Write-Host " Found $ ( $commands.Count ) commands to process"
56+
57+ foreach ($command in $commands ) {
58+ try {
59+ Write-Host " $ ( $command.Name ) " - NoNewline
60+ $params = @ {
61+ CommandInfo = $command
62+ OutputFolder = $DocsOutputFolder
63+ Encoding = ' utf8'
64+ ProgressAction = ' SilentlyContinue'
65+ ErrorAction = ' Stop'
66+ Force = $true
67+ }
68+ $null = New-MarkdownCommandHelp @params
69+ Write-Host ' - ✓' - ForegroundColor Green
70+ } catch {
71+ Write-Host ' - ✗' - ForegroundColor Red
72+ }
73+ }
74+
5875 Get-ChildItem - Path $DocsOutputFolder - Recurse - Force - Include ' *.md' | ForEach-Object {
5976 $fileName = $_.Name
6077 Write-Host " ::group:: - [$fileName ]"
You can’t perform that action at this time.
0 commit comments