Skip to content

Commit 6670fad

Browse files
authored
Update help-generation.md
1 parent 86acd15 commit 6670fad

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

documentation/development-docs/help-generation.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ To do so, you can follow the below steps (which are outlined in the [**Quick sta
1212

1313
```powershell
1414
Install-Module -Name platyPS -Scope CurrentUser
15-
Import-Module platyPS
1615
```
1716

1817
**Note:** this module will need to be installed from the [PowerShell Gallery](http://www.powershellgallery.com/). If, for some reason, this isn't a registered repository when running the `Get-PSRepository` cmdlet, then you will need to register it by running the following command:
@@ -38,6 +37,17 @@ Import-Module -Name $PathToModuleManifest
3837

3938
**Note**: if you do not see all of the changes you made to the cmdlets in your markdown files (_e.g.,_ a cmdlet you deleted is still appearing), you may need to delete any existing Azure PowerShell modules that you have on your machine (installed either through the PowerShell Gallery or by Web Platform Installer) before you import your module.
4039

40+
### Generating help for a new module
41+
42+
For new modules with no existing `help` folder containing the markdown help files, run the following command to do an initial generation:
43+
44+
```powershell
45+
$PathToHelpFolder = "../../help" # Full path to help folder containing markdown files to be generated (e.g., src/Accounts/Accounts/help)
46+
New-MarkdownHelp -Module {{moduleName}} -OutputFolder $PathToHelpFolder -AlphabeticParamsOrder -UseFullTypeName -WithModulePage
47+
```
48+
49+
Once this folder has been generated, follow the steps provided in the below section to update the files with any changes made to the public interface of the cmdlets.
50+
4151
### Updating help after making cmdlet changes
4252

4353
Whenever the public interface for a cmdlet has changed, the corresponding markdown file for that cmdlet will need to be updated to reflect the changes. Public interface changes include the following:
@@ -53,7 +63,6 @@ Whenever the public interface for a cmdlet has changed, the corresponding markdo
5363
- Accept pipeline input
5464
- Add/change output type
5565

56-
5766
#### Updating all markdown files in a module
5867

5968
To update all of the markdown files for a single module, use the [`Update-MarkdownHelpModule`](https://github.com/PowerShell/platyPS/blob/master/docs/Update-MarkdownHelpModule.md) cmdlet:
@@ -71,13 +80,6 @@ If you would like to update the inputs/outputs for a markdown file, please run t
7180
This will update all of the markdown files with public interface changes made to corresponding cmdlets, add markdown files for any new cmdlets, remove markdown files for any deleted cmdlets, and update the module page (_e.g.,_ `Az.Accounts.md`) with any added or removed cmdlets.
7281

7382
_This seems to work better when run from within the `help` folder itself (For e.g. to generate the help files for the [`Network`](src/Network) module run the cmd from under [`Commands.Network/help`](src/Network/Network/help)). Also, you will have to import the profile module from under <Repo base path>/artifacts/Debug/Az.Accounts/Az.Accounts.psd1_
74-
75-
**Note**: If you are doing for the first time for a new module, it may happen that even after calling Update-MarkdownHelpModule will not create new md files. In this case generate the markdown for a single command by using following command and post executing command Update-MarkDownHelpModule will generate all the other files
76-
77-
```powershell
78-
# New-AzDataBoxEdgeDevice is one of newly added cmdlets
79-
New-MarkdownHelp -Command New-AzDataBoxEdgeDevice -OutputFolder $PathToHelpFolder
80-
```
8183

8284
#### Updating a single markdown file
8385

0 commit comments

Comments
 (0)