diff --git a/docs/.gitignore b/docs/.gitignore index 7a05551..8481844 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,6 +1,7 @@ /site .DS_Store +/build #DrawIO Temp files *.bkp diff --git a/docs/build.sh b/docs/build.sh index fe3b3b6..64377e4 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -16,11 +16,34 @@ source ../build-tools/DirectoryTools.sh source ../build-tools/assertions.sh +assertMac "Mac is required to build Fuse Documentation" + +echo "Building Fuse JS Reference Documentation..." npx typedoc --options typedoc.fusejs.json + +echo "Building Fuse Android Reference Documentation..." spushd ../android ./gradlew :fuse:generateJavadoc spopd +echo "Building Fuse iOS Reference Documentation..." +spushd ../ios + xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Release -destination 'generic/platform=iOS' docbuild + xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuseTestTools -configuration Release -destination 'generic/platform=iOS' docbuild + + iosBuild=$(echo "$(xcodebuild -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Release -sdk iphoneos -showBuildSettings | grep -E '^\s*CONFIGURATION_BUILD_DIR =' | awk -F '= ' '{print $2}' | xargs)") + simBuild=$(echo "$(xcodebuild -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Debug -sdk iphonesimulator -showBuildSettings | grep -E '^\s*CONFIGURATION_BUILD_DIR =' | awk -F '= ' '{print $2}' | xargs)") + + rm -rf ../docs/build + mkdir -p ../docs/build + + rm -rf ../docs/docs/ref/fuse-ios + mkdir -p ../docs/docs/ref/fuse-ios + + xcrun docc convert ./Overview.docc --fallback-display-name BTFuse --output-dir ../docs/build/Overview.doccarchive + xcrun docc merge ../docs/build/Overview.doccarchive $iosBuild/BTFuse.doccarchive $iosBuild/BTFuseTestTools.doccarchive --output-path ../docs/docs/ref/fuse-ios +spopd + rm -rf ./docs/ref/fuse-android cp -r ../android/fuse/build/docs/javadoc ./docs/ref/fuse-android diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index b85e475..3a96f08 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -81,6 +81,7 @@ nav: - API Reference: - Fuse JS: ref/fuse-js/index.html - Fuse Android: ref/fuse-android/index.html + - Fuse iOS: ref/fuse-ios/documentation/overview/index.html # - API Reference: # - Index: api-ref/index.md diff --git a/ios/BTFuse.xcworkspace/contents.xcworkspacedata b/ios/BTFuse.xcworkspace/contents.xcworkspacedata index d1ff831..2cecd15 100644 --- a/ios/BTFuse.xcworkspace/contents.xcworkspacedata +++ b/ios/BTFuse.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:Overview.docc">