From 6b213427cf90063e2a232d894fb49179b1359a8c Mon Sep 17 00:00:00 2001 From: Jaesung Lee Date: Tue, 17 Oct 2023 21:44:40 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=B6=94=EA=B0=80]=20=EC=89=98=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GENERATE_DOCS.sh | 13 +++++++++++++ README.md | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100755 GENERATE_DOCS.sh diff --git a/GENERATE_DOCS.sh b/GENERATE_DOCS.sh new file mode 100755 index 0000000..6375e7d --- /dev/null +++ b/GENERATE_DOCS.sh @@ -0,0 +1,13 @@ +set -e + +# 사전 정의 +OUTPUT_DIRECTORY_PATH="./docs" +TARGET_NAME="PackageDocCExample" +HOSTING_BASE_PATH="package-docc-example" + +# 문서 빌드 +swift package --allow-writing-to-directory ${OUTPUT_DIRECTORY_PATH} \ + generate-documentation --target ${TARGET_NAME} --disable-indexing \ + --output-path ${OUTPUT_DIRECTORY_PATH} \ + --transform-for-static-hosting \ + --hosting-base-path ${HOSTING_BASE_PATH} diff --git a/README.md b/README.md index cd2221c..e95d0f2 100644 --- a/README.md +++ b/README.md @@ -147,3 +147,12 @@ $ swift package --allow-writing-to-directory {저장위치} \ | `--output-path {저장위치}` | 문서 파일 저장 위치 | 3. 커밋 후 푸시 + +### 스크립트로 만들기 + +`GENERATE_DOCS.sh` 참고 + +```bash +chmod +x ./GENERATE_DOCS.sh +./GENERATE_DOCS.sh +```