Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating documentation for multiple SPM modules #1194

Closed
MortenGregersen opened this issue May 22, 2020 · 2 comments
Closed

Generating documentation for multiple SPM modules #1194

MortenGregersen opened this issue May 22, 2020 · 2 comments
Labels

Comments

@MortenGregersen
Copy link

I have a SPM package with multiple libraries. I want to generate documentation for the types in all the libraries (1 main library and 2 support libraries for testing and SwiftUI bindings).

I thought I could just run the jazzy command with a wildcard --include= but it only takes the files from the specified module.

jazzy --module Fluxor --swift-build-tool spm --include="Sources/FluxorSwiftUI/*.swift"

How do I generate documentation for types in all the libraries in my package?

@johnfairh
Copy link
Collaborator

You'll have to grab each module separately then merge them:

sourcekitten doc --spm --module-name Module1 > mod1.json
sourcekitten doc --spm --module-name Module2 > mod2.json
sourcekitten doc --spm --module-name Module3 > mod3.json
jazzy --sourcekitten-sourcefile mod1.json,mod2.json,mod3.json

@MortenGregersen
Copy link
Author

Thanks! It works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants