1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-29 23:01:16 +03:00

Clean up and document project files (#4560)

This commit is contained in:
Niels Lohmann
2025-01-17 06:53:35 +01:00
committed by GitHub
parent ad2ee18539
commit 26cfec34be
519 changed files with 3301 additions and 1332 deletions

View File

@ -1,39 +1,35 @@
# serve the site locally
serve: prepare_files style_check
serve: style_check
venv/bin/mkdocs serve
serve_dirty: prepare_files style_check
serve_dirty: style_check
venv/bin/mkdocs serve --dirtyreload
build: prepare_files style_check
# This target is used in the CI (ci_test_build_documentation).
# This target is used by the docset Makefile.
build: style_check
venv/bin/mkdocs build
# create files that are not versioned inside the mkdocs folder (images, examples)
prepare_files: clean
mkdir docs/examples
cp -r ../json.gif docs/images
cp -r ../examples/*.cpp ../examples/*.output docs/examples
style_check:
@cd docs ; python3 ../scripts/check_structure.py
@cd docs ; ../venv/bin/python3 ../scripts/check_structure.py
# clean subfolders
clean:
rm -fr docs/images/json.gif docs/examples
# check the links in the documentation
link_check:
ENABLED_HTMLPROOFER=true venv/bin/mkdocs build
# publish site to GitHub pages (not working in GitHub Actions; need special action)
publish: prepare_files
publish:
venv/bin/mkdocs gh-deploy --clean --force
# install a Python virtual environment
# This target is used by the docset Makefile.
install_venv: requirements.txt
python3 -mvenv venv
venv/bin/pip install --upgrade pip
venv/bin/pip install wheel
venv/bin/pip install -r requirements.txt
# uninstall the virtual environment
uninstall_venv: clean
uninstall_venv:
rm -fr venv
update_requirements: