-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild-docs.ps1
More file actions
37 lines (31 loc) · 937 Bytes
/
build-docs.ps1
File metadata and controls
37 lines (31 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Build Documentation with DocFx
param(
[switch]$Clean,
[switch]$Help
)
if ($Help) {
Write-Host "DocFx Documentation Build Script"
Write-Host ""
Write-Host "Usage: .\build-docs.ps1 [options]"
Write-Host ""
Write-Host "Options:"
Write-Host " -Clean Remove output directories before building"
Write-Host " -Help Show this help message"
exit 0
}
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
$docfxPath = Join-Path $scriptPath "doc/docfx"
$docsPath = Join-Path $scriptPath "doc/site"
Write-Host "Documentation Build Script"
Write-Host ""
if ($Clean -and (Test-Path $docsPath)) {
Write-Host "Cleaning output directory: $docsPath"
Remove-Item $docsPath -Recurse -Force
Write-Host ""
}
Push-Location $docfxPath
docfx build docfx.json
Pop-Location
Write-Host ""
Write-Host "Build complete!"
Write-Host "Output: $docsPath"