Skip to content

Commit

Permalink
feat: expand Swift integration with Mint support (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
levibostian authored May 24, 2024
1 parent 2af01be commit 04a6d51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,20 @@ python3 -m pip install --user lefthook

## <a id="swift"></a> Swift

You can find the Swift wrapper plugin [here](https://github.com/csjones/lefthook-plugin). To utilize lefthook, include the plugin in the dependencies section of your `Package.swift`:
You can find the Swift wrapper plugin [here](https://github.com/csjones/lefthook-plugin).

Utilize lefthook in your Swift project using Swift Package Manager:

```swift
.package(url: "https://github.com/csjones/lefthook-plugin.git", exact: "1.6.12"),
```

Or, with [mint](https://github.com/yonaskolb/Mint):

```bash
mint run csjones/lefthook-plugin
```

## <a id="scoop"></a> Scoop for Windowss

```sh
Expand Down
3 changes: 3 additions & 0 deletions internal/templates/hook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ call_lefthook()
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
Expand Down

0 comments on commit 04a6d51

Please sign in to comment.