Easily add a Git pre-commit hook to your Node.js project.
pro-commit
Easily add a Git pre-commit hook to your Node.js project.
Install
npm install --save-dev pro-commit
Usage
Add prepare
and pro-commit:task
to scripts
in package.json
:
{
"scripts": {
"prepare": "pro-commit",
"pro-commit:task": "..."
}
}
Run an install to ensure that the prepare
lifecycle script sets up a Git pre-commit hook:
npm install