mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-21 21:06:11 +01:00
Add infrastructure for embedding code samples in docs.
This commit is contained in:
parent
f57689f888
commit
8c3970465d
9
mdsnippets.json
Normal file
9
mdsnippets.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ReadOnly": false,
|
||||||
|
"TocLevel": 5,
|
||||||
|
"Exclude": [
|
||||||
|
"cmake-build"
|
||||||
|
],
|
||||||
|
"WriteHeader": false,
|
||||||
|
"Convention": "InPlaceOverwrite"
|
||||||
|
}
|
23
tools/scripts/updateDocumentSnippets.py
Executable file
23
tools/scripts/updateDocumentSnippets.py
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from scriptCommon import catchPath
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
# ---------------------------------------------------
|
||||||
|
# Update code examples
|
||||||
|
# ---------------------------------------------------
|
||||||
|
# For info on mdsnippets, see https://github.com/SimonCropp/MarkdownSnippets
|
||||||
|
|
||||||
|
# install dotnet SDK from http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
|
||||||
|
# Then install MarkdownSnippets.Tool with
|
||||||
|
# dotnet tool install -g MarkdownSnippets.Tool
|
||||||
|
# To update:
|
||||||
|
# dotnet tool update -g MarkdownSnippets.Tool
|
||||||
|
# To uninstall (e.g. to downgrade to a lower version)
|
||||||
|
# dotnet tool uninstall -g MarkdownSnippets.Tool
|
||||||
|
|
||||||
|
os.chdir(catchPath)
|
||||||
|
|
||||||
|
subprocess.run('dotnet tool update -g MarkdownSnippets.Tool --version 21.2.0', shell=True, check=True)
|
||||||
|
subprocess.run('mdsnippets', shell=True, check=True)
|
Loading…
Reference in New Issue
Block a user