From 400464064b36d58cedcce9a5aceec729fd52fd68 Mon Sep 17 00:00:00 2001 From: MichaelGrafnetter Date: Sat, 11 Mar 2017 08:40:50 +0100 Subject: [PATCH] Initial PlatyPS doc generation --- Scripts/Build-PSHelp.ps1 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Scripts/Build-PSHelp.ps1 diff --git a/Scripts/Build-PSHelp.ps1 b/Scripts/Build-PSHelp.ps1 new file mode 100644 index 0000000..bc37008 --- /dev/null +++ b/Scripts/Build-PSHelp.ps1 @@ -0,0 +1,31 @@ + +if((Get-Module -Name platyPS -ListAvailable) -eq $null) +{ + # We need the platyPS module, so install it if it is missing. + Install-PackageProvider -Name NuGet -Force -ForceBootstrap -Scope CurrentUser | Out-Null + Install-Module -Name platyPS -Scope CurrentUser -Force -Confirm:$false + +} + +# Load the platyPS module +Import-Module platyPS -Force -ErrorAction Stop + + +$rootDir = Split-Path $PSScriptRoot -Parent +$locale = 'en-US' +$dsInternalsModulePath = Join-Path $rootDir 'Build\bin\Release\DSInternals' +$dsInternalsModuleManifestPath = Join-Path $dsInternalsModulePath "DSInternals.psd1" +$mdHelpPath = Join-Path $rootDir 'Doc\PowerShell' +$xmlHelpPath = Join-Path $dsInternalsModulePath $locale + +Import-Module -Name $dsInternalsModuleManifestPath + +<# +Note: This code has been used to create the initial version of the help files: +New-MarkdownHelp -Module DSInternals -AlphabeticParamsOrder -Locale $locale -WithModulePage -HelpVersion 1.0 -OutputFolder $mdHelpPath +New-MarkdownAboutHelp -AboutName DSInternals -OutputFolder $mdHelpPath +#> + +Update-MarkdownHelpModule -Path $mdHelpPath -RefreshModulePage -AlphabeticParamsOrder + +New-ExternalHelp -Path $mdHelpPath -OutputPath $xmlHelpPath -Force \ No newline at end of file