File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,21 @@ 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 the Swift Package
151
+ Manager from the command line. The Swift-DocC SwiftPM plugin will try to read
152
+ ` DOCC_EXEC` environment variable value, and use the path you provded if it' s set.
153
+
154
+ 1. In your project' s ` Package.swift` , add a dependency on the [` Swift-DocC Plugin` ](https://github.com/apple/swift-docc-plugin).
155
+ 2. Set the ` DOCC_EXEC` environment variable and run the documentation generation
156
+ command:
157
+
158
+ ` ` ` bash
159
+ DOCC_EXEC=/path/to/docc swift package generate-documentation
160
+ ` ` `
161
+
148
162
# # Using `docc` to build and preview documentation
149
163
150
164
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