aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2025-04-12 09:57:36 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2025-04-12 09:57:36 +0800
commit75cad9c0e858d298b99689c45fe0689a9a714380 (patch)
treee9edab6726d2b47781eb0d6c8acf883a92b4d24d
parent694356e5813c65fae237c1f1a828976d956aaf47 (diff)
添加了生成文档的批处理
-rw-r--r--.init/generate_docs.bat33
1 files changed, 33 insertions, 0 deletions
diff --git a/.init/generate_docs.bat b/.init/generate_docs.bat
new file mode 100644
index 0000000..3a74331
--- /dev/null
+++ b/.init/generate_docs.bat
@@ -0,0 +1,33 @@
+@echo off
+setlocal enabledelayedexpansion
+
+:: 定义全局参数
+set DOC_ROOT=..\doc
+set CLIENT_DOC=%DOC_ROOT%\client-documents
+set CORE_DOC=%DOC_ROOT%\core-documents
+
+:: 清理旧文档目录
+if exist "%CLIENT_DOC%" rmdir /s /q "%CLIENT_DOC%"
+if exist "%CORE_DOC%" rmdir /s /q "%CORE_DOC%"
+
+:: 生成客户端文档
+cd ..\client
+cargo doc --no-deps
+if exist "target\doc" (
+ move "target\doc" "%CLIENT_DOC%"
+ echo [SUCCESS] Client docs moved to: %CLIENT_DOC%
+) else (
+ echo [ERROR] Client docs generation failed
+)
+
+:: 生成核心库文档
+cd ..\core
+cargo doc --no-deps
+if exist "target\doc" (
+ move "target\doc" "%CORE_DOC%"
+ echo [SUCCESS] Core docs moved to: %CORE_DOC%
+) else (
+ echo [ERROR] Core docs generation failed
+)
+
+endlocal