From 5053a173507bfca950c4fd694b4eae4d20f26fb1 Mon Sep 17 00:00:00 2001 From: fummicc1 Date: Sun, 13 Oct 2024 09:54:27 +0900 Subject: [PATCH] chore: refactor scripts. Trying to support multi target docc --- generate_docs.sh | 20 -------------------- scripts/format.sh | 2 +- scripts/generate_docs.sh | 13 +++++++++++++ 3 files changed, 14 insertions(+), 21 deletions(-) delete mode 100755 generate_docs.sh create mode 100755 scripts/generate_docs.sh diff --git a/generate_docs.sh b/generate_docs.sh deleted file mode 100755 index cf221c9..0000000 --- a/generate_docs.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -swift package --allow-writing-to-directory docs \ - generate-documentation --target Csv2Img \ - --disable-indexing \ - --transform-for-static-hosting \ - --hosting-base-path csv2img \ - --output-path docs - - -swift package --allow-writing-to-directory ../Csv2ImgCmd_DocC/docs \ - generate-documentation --target Csv2ImgCmd \ - --disable-indexing \ - --transform-for-static-hosting \ - --hosting-base-path Csv2ImgCmd_DocC \ - --output-path ../Csv2ImgCmd_DocC/docs - -cp res/app_privacy_policy.html docs/app_privacy_policy.html -rm docs/index.html -cp README.md docs/index.md \ No newline at end of file diff --git a/scripts/format.sh b/scripts/format.sh index 61f01e7..c81389b 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -1,4 +1,4 @@ #!/bin/bash -# Format the code using SwiftFormat +# Format the code using swift-format swift format . --in-place --recursive \ No newline at end of file diff --git a/scripts/generate_docs.sh b/scripts/generate_docs.sh new file mode 100755 index 0000000..2e1426b --- /dev/null +++ b/scripts/generate_docs.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +swift package --allow-writing-to-directory docs \ + generate-documentation \ + --target Csv2Img --target Csv2ImgCmd --target CsvBuilder \ + --disable-indexing \ + --transform-for-static-hosting \ + --enable-experimental-combined-documentation \ + --hosting-base-path csv2img \ + --output-path docs + +cp res/app_privacy_policy.html docs/app_privacy_policy.html +cp README.md docs/index.md \ No newline at end of file