-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1089 from realm/jf-spm-integration
SwiftPM integration
- Loading branch information
Showing
9 changed files
with
95 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
Both Swift and Objective-C projects are supported. | ||
|
||
*Objective-C support was recently added, so please report any issues you find.* | ||
*SwiftPM support was recently added, so please report any issues you find.* | ||
|
||
Instead of parsing your source files, `jazzy` hooks into [Clang][clang] and | ||
[SourceKit][sourcekit] to use the [AST][ast] representation of your code and | ||
|
@@ -23,9 +23,8 @@ unacceptable behavior to [[email protected]](mailto:[email protected]). | |
|
||
## Requirements | ||
|
||
* A version of [Xcode][xcode] capable of building the project you wish to | ||
document. It must be installed in a location indexed by Spotlight for the | ||
`--swift-version` configuration option to succeed. | ||
* Development tools that can build the project you wish to document. Jazzy supports | ||
both [Xcode][xcode] and [Swift Package Manager][spm] projects. | ||
|
||
## Installation | ||
|
||
|
@@ -41,8 +40,9 @@ common problems. | |
Run `jazzy` from your command line. Run `jazzy -h` for a list of additional options. | ||
|
||
If your Swift module is the first thing to build, and it builds fine when running | ||
`xcodebuild` without any arguments from the root of your project, then just running | ||
`jazzy` (without any arguments) from the root of your project should succeed too! | ||
`xcodebuild` or `swift build` without any arguments from the root of your project, then | ||
just running `jazzy` (without any arguments) from the root of your project should | ||
succeed too! | ||
|
||
You can set options for your project’s documentation in a configuration file, | ||
`.jazzy.yaml` by default. For a detailed explanation and an exhaustive list of | ||
|
@@ -83,13 +83,22 @@ jazzy \ | |
--github_url https://github.com/realm/realm-cocoa \ | ||
--github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 \ | ||
--module-version 0.96.2 \ | ||
--xcodebuild-arguments -scheme,RealmSwift \ | ||
--build-tool-arguments -scheme,RealmSwift \ | ||
--module RealmSwift \ | ||
--root-url https://realm.io/docs/swift/0.96.2/api/ \ | ||
--output docs/swift_output \ | ||
--theme docs/themes | ||
``` | ||
|
||
This is how docs are generated for a project that uses the Swift Package Manager: | ||
|
||
```shell | ||
jazzy \ | ||
--module DeckOfPlayingCards \ | ||
--swift-build-tool spm \ | ||
--build-tool-arguments -Xswiftc,-swift-version,-Xswiftc,5 | ||
``` | ||
|
||
### Objective-C | ||
|
||
To generate documentation for Objective-C headers, you must pass the following | ||
|
@@ -116,7 +125,7 @@ jazzy \ | |
--github_url https://github.com/realm/realm-cocoa \ | ||
--github-file-prefix https://github.com/realm/realm-cocoa/tree/v2.2.0 \ | ||
--module-version 2.2.0 \ | ||
--xcodebuild-arguments --objc,Realm/Realm.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd) \ | ||
--build-tool-arguments --objc,Realm/Realm.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd) \ | ||
--module Realm \ | ||
--root-url https://realm.io/docs/objc/2.2.0/api/ \ | ||
--output docs/objc_output \ | ||
|
@@ -326,3 +335,4 @@ read [our blog](https://realm.io/news) or say hi on twitter | |
[SourceKitten]: https://github.com/jpsim/SourceKitten "SourceKitten" | ||
[bundler]: https://rubygems.org/gems/bundler | ||
[mustache]: https://mustache.github.io "Mustache" | ||
[spm]: https://swift.org/package-manager/ "Swift Package Manager" |
Submodule SourceKitten
updated
38 files
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule integration_specs
updated
5 files