ToDo
The script currently cannot deal with:
- multi command packages: The package specifier (e.g. Assist) is used to build the package. It has to be checked using (
xcodebuild -list -json) which are the targets and if there is a <target-name>-Package which can build the documentation for them all
- packages for macOS targets: The destination is hardcoded inside the script for iOS it should be passed and handled correctly in the release script
An exmple would be to integrate the official DocC PLugin with SPM:
dependencies: [
[...]
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
[...]
],
swift package plugin --list
# ‘generate-documentation’ (plugin ‘Swift-DocC’ in package ‘SwiftDocCPlugin’)
# ‘preview-documentation’ (plugin ‘Swift-DocC Preview’ in package ‘SwiftDocCPlugin’)
swift package preview-documentation
# Note: The Swift-DocC Preview plugin requires passing the '--disable-sandbox' flag
swift package --disable-sandbox preview-documentation
ToDo
The script currently cannot deal with:
xcodebuild -list -json) which are the targets and if there is a<target-name>-Packagewhich can build the documentation for them allAn exmple would be to integrate the official DocC PLugin with SPM: