Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/project-cemetery/lefthook
The fastest polyglot Git hooks manager out there
https://github.com/project-cemetery/lefthook
git hooks lefthook
Last synced: about 1 month ago
JSON representation
The fastest polyglot Git hooks manager out there
- Host: GitHub
- URL: https://github.com/project-cemetery/lefthook
- Owner: project-cemetery
- License: mit
- Archived: true
- Created: 2019-08-24T05:42:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-24T11:50:55.000Z (about 5 years ago)
- Last Synced: 2024-05-01T17:35:11.654Z (6 months ago)
- Topics: git, hooks, lefthook
- Language: Dart
- Homepage: https://github.com/Arkweid/lefthook
- Size: 8.79 KB
- Stars: 6
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lefthook
> The fastest polyglot Git hooks manager out there
Fast and powerful Git hooks manager for Node.js, Ruby or any other type of projects.
* **Fast.** It is written in Go. Can run commands in parallel.
* **Powerful.** With a few lines in the config you can check only the changed files on `pre-push` hook.
* **Simple.** It is single dependency-free binary which can work in any environment.## Original tool
This repo is just Dart-wrapper for [Lefthook](https://github.com/Arkweid/lefthook). For detailed documentation, check the main repository.
## Installation
```sh
pub global activate lefthook
```You are beautiful! Just create `lefthook.yml` in root of your project, add description of hooks, and start using it.
## Examples
### Flutter
For project based on Flutter, you can run formatter before every commit and run tests and static analysis before push.
```yml
# lefthook.ymlpre-push:
parallel: true
commands:
tests:
run: flutter test
linter:
run: flutter analyze libpre-commit:
commands:
pretty:
glob: "*.dart"
run: flutter format {staged_files}
```### More
More examples in [documentation of original repository](https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md#examples).