define git hooks as scripts in your package.json (requires node >= 0.12
)
package.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:
pre-commit
post-commit
post-merge
pre-push
npm i captain-git-hook
The MIT License (MIT) Maximilian Hoffmann