Skip to content

Commit a5b0bbf

Browse files
Add “Using in your project” section to readme
1 parent 9967235 commit a5b0bbf

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,31 @@ The `Delta` type also conforms to all standard protocols (depending on the confo
3333
- `~Copyable`
3434

3535
Additionally, `Delta` conforms to `RandomAccessCollection`, allowing for iteration over the elements and many other operations provided by `Sequence`, `Collection`, and `BidirectionalCollection`.
36+
37+
## Using Swift Delta in your project
38+
39+
Add `swift-delta` as a dependency to your package:
40+
41+
```swift
42+
let package = Package(
43+
// ...
44+
dependencies: [
45+
.package(url: "https://github.com/Formkunft/swift-delta", .upToNextMajor(from: "0.3.0")),
46+
],
47+
targets: [
48+
.target(
49+
// ...
50+
dependencies: [
51+
.product(name: "Delta", package: "swift-delta"),
52+
]),
53+
]
54+
)
55+
```
56+
57+
Then, import `Delta` in your code:
58+
59+
```swift
60+
import Delta
61+
62+
// ...
63+
```

0 commit comments

Comments
 (0)