diff options
| author | Yong He <yonghe@outlook.com> | 2021-04-24 00:19:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-24 00:19:32 -0700 |
| commit | 4f83d48b28b417a16d7caa834a9248b1bd50cdb8 (patch) | |
| tree | d36710d45fc0dcb07f110390c85868cfa2b4f2a5 /docs/user-guide/build_toc.ps1 | |
| parent | 9a5672d7b8a155117a2c3f8375e3b8a5b43d91b7 (diff) | |
Auto generate interactive table of contents for user-guide. (#1818)
Diffstat (limited to 'docs/user-guide/build_toc.ps1')
| -rw-r--r-- | docs/user-guide/build_toc.ps1 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/user-guide/build_toc.ps1 b/docs/user-guide/build_toc.ps1 new file mode 100644 index 000000000..15603c8cb --- /dev/null +++ b/docs/user-guide/build_toc.ps1 @@ -0,0 +1,9 @@ +$job = Start-Job -ArgumentList $PSScriptRoot -ScriptBlock { + Set-Location $args[0] + $code = (Get-Content -Raw -Path "scripts/Program.cs").ToString() + $assemblies = ("System.Core", "System.IO", "System.Collections") + Add-Type -ReferencedAssemblies $assemblies -TypeDefinition $code -Language CSharp + [toc.Builder]::Run($args[0]) +} +Wait-Job $job +Receive-Job -Job $job |
