From 087031e490da438469ae1f06b04ebfd2f1a1a3d2 Mon Sep 17 00:00:00 2001 From: Mahdi Bahrami Date: Mon, 4 Nov 2024 02:19:02 +0330 Subject: [PATCH] Add installation guide to the README (#210) * Add installation guide to the README * add / --------- Co-authored-by: Tim Condon <0xTim@users.noreply.github.com> --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index c635d6a3..fc07ef97 100644 --- a/README.md +++ b/README.md @@ -408,3 +408,28 @@ let keyCollection = await JWTKeyCollection().add( serializer: serializer ) ``` + +## Installation + +Run the following commands on your package using SwiftPM, replacing `MyTarget` with the name of your target: + +```swift +cd /path/to/project/root/directory +swift package add-dependency https://github.com/vapor/jwt-kit.git --from 5.0.0 +swift package add-target-dependency JWTKit MyTarget +``` + +Or manually add the following to your `Package.swift` file: + +```swift +dependencies: [ + .package(url: "https://github.com/vapor/jwt-kit.git", from: "5.0.0") +], +targets: [ + .target( + name: "MyTarget", + dependencies: [ + .target(name: "JWTKit"), + ]), +] +```