Skip to content

Commit 2c570a9

Browse files
committed
Update README
1 parent 8e0a652 commit 2c570a9

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,25 @@ MarkdownUI comes with a few more tricks on the sleeve. You can explore the
239239
![](Examples/Demo/Screenshot~dark.png#gh-dark-mode-only)
240240

241241
## Installation
242-
You can add MarkdownUI to an Xcode project as a package dependency.
242+
### Adding MarkdownUI to a Swift package
243+
244+
To use MarkdownUI in a Swift Package Manager project, add the following line to the dependencies in your `Package.swift` file:
245+
246+
```swift
247+
.package(url: "https://github.com/gonzalezreal/swift-markdown-ui", from: "2.0.0")
248+
```
249+
250+
Include `"MarkdownUI"` as a dependency for your executable target:
251+
252+
```swift
253+
.target(name: "<target>", dependencies: [
254+
.product(name: "MarkdownUI", package: "swift-markdown-ui")
255+
]),
256+
```
257+
258+
Finally, add `import MarkdownUI` to your source code.
259+
260+
### Adding MarkdownUI to an Xcode project
243261

244262
1. From the **File** menu, select **Add Packages…**
245263
1. Enter `https://github.com/gonzalezreal/swift-markdown-ui` into the

0 commit comments

Comments
 (0)