File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- .PHONY : install_base install_deps build_docs build test run help all build_wasm build_docker run_docker
1+ .PHONY : install_base install_deps docs build_docs build test run help all build_wasm build_docker run_docker
22
33.DEFAULT_GOAL := help
44
@@ -36,10 +36,16 @@ install_deps:
3636 uv venv || python3 -m venv .venv
3737 uv pip install -e " .[dev]" || pip install -e " .[dev]"
3838
39+ docs :
40+ @rm -rf docs/api docs/html
41+ @mkdir -p docs/api
42+ uv run pdoc src/openapi_client -o docs/api
43+ @cd docs && ln -sf api html
44+
3945build_docs :
4046 @echo " Building docs in $( DOCS_DIR) "
4147 @mkdir -p $(DOCS_DIR )
42- pdoc src/openapi_client -o $(DOCS_DIR )
48+ uv run pdoc src/openapi_client -o $(DOCS_DIR )
4349
4450build :
4551 @echo " Building binary/package in $( BIN_DIR) "
5864 @echo " Available tasks:"
5965 @echo " install_base : install language runtime (Python 3)"
6066 @echo " install_deps : install local dependencies"
67+ @echo " docs : build the API docs and symlink to docs/html"
6168 @echo " build_docs : build the API docs [dir]"
6269 @echo " build : build the CLI [dir]"
6370 @echo " test : run tests locally"
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ if "%TASK%"=="" set TASK=help
66
77if " %TASK% " == " install_base" goto install_base
88if " %TASK% " == " install_deps" goto install_deps
9+ if " %TASK% " == " docs" goto docs
910if " %TASK% " == " build_docs" goto build_docs
1011if " %TASK% " == " build" goto build
1112if " %TASK% " == " test" goto test
@@ -20,6 +21,7 @@ if "%TASK%"=="all" goto help
2021echo Available tasks:
2122echo install_base : install language runtime (Python 3 via winget)
2223echo install_deps : install local dependencies
24+ echo docs : build the API docs and symlink to docs/html
2325echo build_docs : build the API docs [dir]
2426echo build : build the CLI [dir]
2527echo test : run tests locally
@@ -42,6 +44,16 @@ uv venv
4244uv pip install -e " .[dev]"
4345goto :EOF
4446
47+ :docs
48+ if exist docs\api rmdir /s /q docs\api
49+ if exist docs\html rmdir /s /q docs\html
50+ mkdir docs\api 2 > NUL
51+ .venv\Scripts\python.exe -m pdoc src/openapi_client -o docs\api
52+ cd docs
53+ mklink /J html api
54+ cd ..
55+ goto :EOF
56+
4557:build_docs
4658set DOCS_DIR = %2
4759if " %DOCS_DIR% " == " " set DOCS_DIR = docs
You can’t perform that action at this time.
0 commit comments