Skip to content

Commit 3b0eda8

Browse files
Merge pull request #158 from StartAutomating/HelpOut-The-MAMLs
HelpOut 0.5
2 parents 33ed6cb + 9f4223a commit 3b0eda8

22 files changed

Lines changed: 347 additions & 653 deletions

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
### HelpOut 0.5:
2+
3+
* Install-MAML - Adding -NoComment (#157)
4+
* Install-MAML - Adding -Minify (#158)
5+
6+
Thanks @potatoqualitee !
7+
8+
---
9+
110
### HelpOut 0.4.9:
211

312
* Supporting custom attribute formatting with -FormatAttribute (#147)

Get-ScriptReference.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function Get-ScriptReference
159159
end {
160160
$myParams = @{} + $PSBoundParameters
161161
if (-not $allFiles.Count) { return }
162-
$c, $t, $id = 0, $allFiles.Count, $(Get-Random)
162+
$c, $t, $id = 0, $allFiles.Count, [Random]::new().Next()
163163
foreach ($file in $allFiles) {
164164
$c++
165165
$resolvedFile= try { $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($file)} catch { $null }

HelpOut-Help.xml

Lines changed: 95 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<maml:description>
99
<maml:para>Gets MAML help</maml:para>
1010
</maml:description>
11-
<dev:version>0.4.9</dev:version>
11+
<dev:version>0.5</dev:version>
1212
</command:details>
1313
<maml:description>
1414
<maml:para>Gets help for a given command, as MAML (Microsoft Assistance Markup Language) xml.</maml:para>
@@ -400,7 +400,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
400400
<maml:description>
401401
<maml:para>Gets Markdown Help</maml:para>
402402
</maml:description>
403-
<dev:version>0.4.9</dev:version>
403+
<dev:version>0.5</dev:version>
404404
</command:details>
405405
<maml:description>
406406
<maml:para>Gets Help for a given command, in Markdown</maml:para>
@@ -703,7 +703,7 @@ Get-MarkdownHelp Get-Help # Get-MarkdownHelp is a wrapper for Get-Help </dev:cod
703703
<maml:description>
704704
<maml:para>Gets a script's references</maml:para>
705705
</maml:description>
706-
<dev:version>0.4.9</dev:version>
706+
<dev:version>0.5</dev:version>
707707
</command:details>
708708
<maml:description>
709709
<maml:para>Gets the external references of a given PowerShell command. These are the commands the script calls, and the types the script uses.</maml:para>
@@ -829,7 +829,7 @@ Get-MarkdownHelp Get-Help # Get-MarkdownHelp is a wrapper for Get-Help </dev:cod
829829
<maml:description>
830830
<maml:para>Gets a Script's story</maml:para>
831831
</maml:description>
832-
<dev:version>0.4.9</dev:version>
832+
<dev:version>0.5</dev:version>
833833
</command:details>
834834
<maml:description>
835835
<maml:para>Gets the Script's "Story"</maml:para>
@@ -992,7 +992,7 @@ Get-MarkdownHelp Get-Help # Get-MarkdownHelp is a wrapper for Get-Help </dev:cod
992992
<maml:description>
993993
<maml:para>Installs MAML into a module</maml:para>
994994
</maml:description>
995-
<dev:version>0.4.9</dev:version>
995+
<dev:version>0.5</dev:version>
996996
</command:details>
997997
<maml:description>
998998
<maml:para>Installs MAML into a module. </maml:para>
@@ -1113,7 +1113,7 @@ Get-MarkdownHelp Get-Help # Get-MarkdownHelp is a wrapper for Get-Help </dev:cod
11131113
<command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false">
11141114
<maml:name>NoVersion</maml:name>
11151115
<maml:description>
1116-
<maml:para>If set, the generate MAML will not contain a version number.
1116+
<maml:para>If set, the generated MAML will not contain a version number.
11171117
This slightly reduces the size of the MAML file, and reduces the rate of changes in the MAML file.</maml:para>
11181118
</maml:description>
11191119
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
@@ -1137,6 +1137,19 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
11371137
<dev:defaultValue>
11381138
</dev:defaultValue>
11391139
</command:parameter>
1140+
<command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false">
1141+
<maml:name>NoComment</maml:name>
1142+
<maml:description>
1143+
<maml:para>If set, will remove comments within functions when generating allcommands.ps1</maml:para>
1144+
</maml:description>
1145+
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
1146+
<dev:type>
1147+
<maml:name>Switch</maml:name>
1148+
<maml:uri />
1149+
</dev:type>
1150+
<dev:defaultValue>
1151+
</dev:defaultValue>
1152+
</command:parameter>
11401153
<command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false">
11411154
<maml:name>PassThru</maml:name>
11421155
<maml:description>
@@ -1150,6 +1163,34 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
11501163
<dev:defaultValue>
11511164
</dev:defaultValue>
11521165
</command:parameter>
1166+
<command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false">
1167+
<maml:name>Minify</maml:name>
1168+
<maml:description>
1169+
<maml:para>If set, will minify the code in allcommands.ps1.
1170+
By default, this will stream down the latest version of [PSMinifier](https://github.com/StartAutomating/PSMinifier).</maml:para>
1171+
</maml:description>
1172+
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
1173+
<dev:type>
1174+
<maml:name>Switch</maml:name>
1175+
<maml:uri />
1176+
</dev:type>
1177+
<dev:defaultValue>
1178+
</dev:defaultValue>
1179+
</command:parameter>
1180+
<command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false">
1181+
<maml:name>MinifierSource</maml:name>
1182+
<maml:description>
1183+
<maml:para>If -MinifierSource is like `*Gallery*`, it will use the PowerShell Gallery to download.
1184+
If -MinifierSource is an alternate URL, it will download the contents of that URL (it must define a function named Compress-ScriptBlock).</maml:para>
1185+
</maml:description>
1186+
<command:parameterValue required="false" variableLength="true">String</command:parameterValue>
1187+
<dev:type>
1188+
<maml:name>String</maml:name>
1189+
<maml:uri />
1190+
</dev:type>
1191+
<dev:defaultValue>
1192+
</dev:defaultValue>
1193+
</command:parameter>
11531194
</command:syntaxItem>
11541195
</command:syntax>
11551196
<command:parameters>
@@ -1218,6 +1259,34 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
12181259
<dev:defaultValue>
12191260
</dev:defaultValue>
12201261
</command:parameter>
1262+
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
1263+
<maml:name>MinifierSource</maml:name>
1264+
<maml:description>
1265+
<maml:para>If -MinifierSource is like `*Gallery*`, it will use the PowerShell Gallery to download.
1266+
If -MinifierSource is an alternate URL, it will download the contents of that URL (it must define a function named Compress-ScriptBlock).</maml:para>
1267+
</maml:description>
1268+
<command:parameterValue required="false" variableLength="true">String</command:parameterValue>
1269+
<dev:type>
1270+
<maml:name>String</maml:name>
1271+
<maml:uri />
1272+
</dev:type>
1273+
<dev:defaultValue>
1274+
</dev:defaultValue>
1275+
</command:parameter>
1276+
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
1277+
<maml:name>Minify</maml:name>
1278+
<maml:description>
1279+
<maml:para>If set, will minify the code in allcommands.ps1.
1280+
By default, this will stream down the latest version of [PSMinifier](https://github.com/StartAutomating/PSMinifier).</maml:para>
1281+
</maml:description>
1282+
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
1283+
<dev:type>
1284+
<maml:name>Switch</maml:name>
1285+
<maml:uri />
1286+
</dev:type>
1287+
<dev:defaultValue>
1288+
</dev:defaultValue>
1289+
</command:parameter>
12211290
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
12221291
<maml:name>Module</maml:name>
12231292
<maml:description>
@@ -1231,6 +1300,19 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
12311300
<dev:defaultValue>
12321301
</dev:defaultValue>
12331302
</command:parameter>
1303+
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
1304+
<maml:name>NoComment</maml:name>
1305+
<maml:description>
1306+
<maml:para>If set, will remove comments within functions when generating allcommands.ps1</maml:para>
1307+
</maml:description>
1308+
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
1309+
<dev:type>
1310+
<maml:name>Switch</maml:name>
1311+
<maml:uri />
1312+
</dev:type>
1313+
<dev:defaultValue>
1314+
</dev:defaultValue>
1315+
</command:parameter>
12341316
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
12351317
<maml:name>NoRecurse</maml:name>
12361318
<maml:description>
@@ -1260,7 +1342,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
12601342
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
12611343
<maml:name>NoVersion</maml:name>
12621344
<maml:description>
1263-
<maml:para>If set, the generate MAML will not contain a version number.
1345+
<maml:para>If set, the generated MAML will not contain a version number.
12641346
This slightly reduces the size of the MAML file, and reduces the rate of changes in the MAML file.</maml:para>
12651347
</maml:description>
12661348
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
@@ -1346,7 +1428,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
13461428
<maml:description>
13471429
<maml:para>Determines the percentage of documentation</maml:para>
13481430
</maml:description>
1349-
<dev:version>0.4.9</dev:version>
1431+
<dev:version>0.5</dev:version>
13501432
</command:details>
13511433
<maml:description>
13521434
<maml:para>Determines the percentage of documentation in a given script</maml:para>
@@ -1489,7 +1571,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
14891571
<maml:description>
14901572
<maml:para>Saves a Module's MAML</maml:para>
14911573
</maml:description>
1492-
<dev:version>0.4.9</dev:version>
1574+
<dev:version>0.5</dev:version>
14931575
</command:details>
14941576
<maml:description>
14951577
<maml:para>Generates a Module's MAML file, and then saves it to the appropriate location.</maml:para>
@@ -1526,7 +1608,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
15261608
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
15271609
<maml:name>NoVersion</maml:name>
15281610
<maml:description>
1529-
<maml:para>If set, the generate MAML will not contain a version number.
1611+
<maml:para>If set, the generated MAML will not contain a version number.
15301612
This slightly reduces the size of the MAML file, and reduces the rate of changes in the MAML file.</maml:para>
15311613
</maml:description>
15321614
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
@@ -1595,7 +1677,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
15951677
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
15961678
<maml:name>NoVersion</maml:name>
15971679
<maml:description>
1598-
<maml:para>If set, the generate MAML will not contain a version number.
1680+
<maml:para>If set, the generated MAML will not contain a version number.
15991681
This slightly reduces the size of the MAML file, and reduces the rate of changes in the MAML file.</maml:para>
16001682
</maml:description>
16011683
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
@@ -1664,7 +1746,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
16641746
<command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false">
16651747
<maml:name>NoVersion</maml:name>
16661748
<maml:description>
1667-
<maml:para>If set, the generate MAML will not contain a version number.
1749+
<maml:para>If set, the generated MAML will not contain a version number.
16681750
This slightly reduces the size of the MAML file, and reduces the rate of changes in the MAML file.</maml:para>
16691751
</maml:description>
16701752
<command:parameterValue required="false" variableLength="true">Switch</command:parameterValue>
@@ -1750,7 +1832,7 @@ This slightly reduces the size of the MAML file, and reduces the rate of changes
17501832
<maml:description>
17511833
<maml:para>Saves a Module's Markdown Help</maml:para>
17521834
</maml:description>
1753-
<dev:version>0.4.9</dev:version>
1835+
<dev:version>0.5</dev:version>
17541836
</command:details>
17551837
<maml:description>
17561838
<maml:para>Get markdown help for each command in a module and saves it to the appropriate location.</maml:para>

HelpOut.HelpOut.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# The HelpOut action does not load your module. If you were writing your own HelpOut.ps1 file, you'd want to load the module here.
44

55
# This will save the MarkdownHelp to the docs folder, and output all of the files created.
6-
Save-MarkdownHelp -PassThru -Module HelpOut -IncludeYamlHeader
6+
Save-MarkdownHelp -PassThru -Module HelpOut # -IncludeYamlHeader
77

88
# Outputting a file will check the change in (using the message of the current commit)
99
# If the file has a .CommitMessage property, that will be used instead.
1010

1111
# This will generate the MAML for the module (and output the files changed).
1212
# MAML loads faster than inline help.
13-
Install-MAML -Module HelpOut -PassThru
13+
Install-MAML -Module HelpOut -PassThru -NoComment # -Minify (you can minify if you want to for additional file size savings)

HelpOut.psd1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77
ModuleToProcess='HelpOut.psm1'
88
FormatsToProcess='HelpOut.format.ps1xml'
99
TypesToProcess='HelpOut.types.ps1xml'
10-
ModuleVersion='0.4.9'
10+
ModuleVersion='0.5'
1111
PrivateData = @{
1212
PSData = @{
1313
ProjectURI = 'https://github.com/StartAutomating/HelpOut'
1414
LicenseURI = 'https://github.com/StartAutomating/HelpOut/blob/master/LICENSE'
1515

1616
Tags = 'Markdown', 'Help','PowerShell'
1717
ReleaseNotes = @'
18-
### HelpOut 0.4.9:
18+
### HelpOut 0.5:
1919
20-
* Supporting custom attribute formatting with -FormatAttribute (#147)
21-
* Markdown Formatter - Honoring .FormatAttribute (#148)
22-
* Get-MarkdownHelp -FormatAttribute (#149)
23-
* Save-MarkdownHelp -FormatAttribute (#150)
24-
* Extended Type Formatting - Improving handling of empty directories (#146)
25-
* Updating HelpOut PSA (#152)
20+
* Install-MAML - Adding -NoComment (#157)
21+
* Install-MAML - Adding -Minify (#158)
22+
23+
Thanks @potatoqualitee !
2624
2725
---
2826
2927
Additional Changes in [Changelog](/CHANGELOG.md)
28+
Like It? Start It. Love It? Support It.
29+
3030
'@
3131
}
3232
}

0 commit comments

Comments
 (0)