Skip to content

Commit

Permalink
(chocolateyGH-773) Autodoc - Examples Before Parameters
Browse files Browse the repository at this point in the history
To better mirror both command usage and the PowerShell reference,
provide the examples before the parameters so they are easier to find
and get started with.
  • Loading branch information
ferventcoder committed Jun 6, 2016
1 parent d56b974 commit c47edec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .build.custom/GenerateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ $( if ($_.alertSet -ne $null) { $lineFeed + "## Notes" + $lineFeed + $lineFeed +
## Aliases
$(Get-Aliases $_.Name)
$( if ($_.Examples -ne $null) { Write-Output "$lineFeed## Examples$lineFeed$lineFeed"; ($_.Examples.Example | % { Convert-Example $_ }) -join "$lineFeed$lineFeed"; Write-Output "$lineFeed" })
## Inputs
$( if ($_.InputTypes -ne $null -and $_.InputTypes.Length -gt 0 -and -not $_.InputTypes.Contains('inputType')) { $lineFeed + " * $($_.InputTypes)" + $lineFeed} else { 'None'})
Expand All @@ -303,7 +304,6 @@ $( if ($_.ReturnValues -ne $null -and $_.ReturnValues.Length -gt 0 -and -not $_.
## Parameters
$( if ($_.parameters.parameter.count -gt 0) { $_.parameters.parameter | % { Convert-Parameter $_ $commandName }}) $( if ($hasCmdletBinding) { "$lineFeed### <CommonParameters>$lineFeed$($lineFeed)This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see ``about_CommonParameters`` http://go.microsoft.com/fwlink/p/?LinkID=113216 ." } )
$( if ($_.Examples -ne $null) { Write-Output "$lineFeed## Examples$lineFeed$lineFeed"; ($_.Examples.Example | % { Convert-Example $_ }) -join "$lineFeed$lineFeed" })
$( if ($_.relatedLinks -ne $null) {Write-Output "$lineFeed## Links$lineFeed$lineFeed"; $_.relatedLinks.navigationLink | ? { $_.linkText -ne $null} | % { Write-Output "* [[$($_.LinkText)|Helpers$($_.LinkText.Replace('-',''))]]$lineFeed" }})
[[Function Reference|HelpersReference]]
Expand Down

0 comments on commit c47edec

Please sign in to comment.