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 +```