From 4fbec7a4b228b1af9e4560442f9df6e137a173a6 Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Tue, 15 Mar 2022 14:14:49 +0100 Subject: [PATCH] Updated README.md When importing Plot in another package, you can't just reference it, since the name "Plot" is different from the URL "plot". --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b9238c3..6f29bc0 100644 --- a/README.md +++ b/README.md @@ -528,6 +528,18 @@ let package = Package( ) ``` +When importing Plot in a package, you need to give it a name to reference it: + +```swift + dependencies: [ + .package(name: "Plot", url: "https://github.com/johnsundell/plot.git", from: "0.9.0") + ], + ... + dependencies: [ + "Plot" + ], +``` + Then import Plot wherever you’d like to use it: ```swift @@ -588,4 +600,4 @@ This project does [not come with GitHub Issues-based support](CONTRIBUTING.md#bu If you wish to make a change, [open a Pull Request](https://github.com/JohnSundell/Plot/pull/new) — even if it just contains a draft of the changes you’re planning, or a test that reproduces an issue — and we can discuss it further from there. See [Plot’s contribution guide](CONTRIBUTING.md) for more information about how to contribute to this project. -Hope you’ll enjoy using Plot! \ No newline at end of file +Hope you’ll enjoy using Plot!