File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,22 @@ The next time you invoke a documentation build with the "Build Documentation"
144
144
button in Xcode' s Product menu, your custom `docc` will be used for the build.
145
145
You can confirm that your custom `docc` is being used by opening the latest build
146
146
log in Xcode' s report navigator and expanding the " Compile documentation" step.
147
-
147
+
148
+ # ## Invoking `docc` from Swift Package Manager
149
+
150
+ You can also test a locally built version of Swift-DocC using Swift Package Manager
151
+ CLI. SwiftPM will try to read ` DOCC_EXEC` environment variable value, and use
152
+ the path you provded if it' s set.
153
+
154
+ 1. In your test `Package.swift`, add a dependency on `swift-docc-plugin`.
155
+ [`swift-docc-plugin`](https://github.com/apple-swift-docc-plugin) is a
156
+ Swift Package Manager plugin that invokes `docc` for you, see details in
157
+ `swift-docc-plugin`.
158
+ 2. Set `DOCC_EXEC` environment variable and run documentation generation
159
+ command like this:
160
+
161
+ `DOCC_EXEC=/path/to/docc swift package generate-documentation`
162
+
148
163
## Using `docc` to build and preview documentation
149
164
150
165
The preferred way of building documentation for your Swift package is by using
You can’t perform that action at this time.
0 commit comments