Initial commit
This commit is contained in:
23
BuildTasks/GenerateHelp.Task.ps1
Normal file
23
BuildTasks/GenerateHelp.Task.ps1
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
task GenerateHelp {
|
||||
if (-not(Get-ChildItem -Path $DocsPath -Filter '*.md' -Recurse -ErrorAction 'Ignore'))
|
||||
{
|
||||
"No Markdown help files to process. Skipping help file generation..."
|
||||
return
|
||||
}
|
||||
|
||||
$locales = (Get-ChildItem -Path $DocsPath -Directory).Name
|
||||
foreach ($locale in $locales)
|
||||
{
|
||||
$params = @{
|
||||
ErrorAction = 'SilentlyContinue'
|
||||
Force = $true
|
||||
OutputPath = "$Destination\en-US"
|
||||
Path = "$DocsPath\en-US"
|
||||
}
|
||||
|
||||
# Generate the module's primary MAML help file.
|
||||
"Creating new External help for [$ModuleName]..."
|
||||
$null = New-ExternalHelp @params
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user