https://github.com/maxhoffmann/captain-git-hook
:white_check_mark: define git hooks as scripts in your package.json
https://github.com/maxhoffmann/captain-git-hook
build-automation git-hooks
Last synced: 7 months ago
JSON representation
:white_check_mark: define git hooks as scripts in your package.json
- Host: GitHub
- URL: https://github.com/maxhoffmann/captain-git-hook
- Owner: maxhoffmann
- License: mit
- Created: 2015-03-13T16:42:47.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T23:15:59.000Z (almost 8 years ago)
- Last Synced: 2024-04-24T23:40:59.645Z (almost 2 years ago)
- Topics: build-automation, git-hooks
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 25
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
captain-git-hook [![version][1]][2] [![build][3]][4]
================
define git hooks as scripts in your package.json (requires node `>= 0.12`)
Usage
-----
__package.json__
```json
{
"scripts": {
"pre-commit": "echo 'this prevents commiting' && exit 1"
}
}
```
Add a script to your `package.json` for any git hook you want to listen to.
Currently supported hooks:
```bash
pre-commit
post-commit
post-merge
pre-push
```
Installation
------------
```bash
npm i captain-git-hook
```
LICENSE
-------
The MIT License (MIT) Maximilian Hoffmann
[1]: http://img.shields.io/npm/v/captain-git-hook.svg?style=flat
[2]: https://www.npmjs.org/package/captain-git-hook
[3]: http://img.shields.io/travis/maxhoffmann/captain-git-hook.svg?style=flat
[4]: https://travis-ci.org/maxhoffmann/captain-git-hook