A developer tool to synchronize and install githooks between local and remote repositories. Utilizes promises and async/await patterns to symbolically link files in your projects /hooks
directory to a developers local .git/hooks
. The sync script will check that the remote hooks are newer than any existing local hooks before linking them.
- Node v8.9.3 (LTS recommended)
Install the module as a dev dependency of your project.
npm install hooksync -D
Add hooksync as the "postinstall" script of your package.json
. This will trigger the sync script to run whenever a developer runs npm install
.
//Inside your package.json
"scripts": {
"postinstall": "hooksync",
},
Alternatively pass the full PATH of the directory of the folder you want to have parsed and linked to .git/hooks
.
"scripts": {
"postinstall": "hooksync /path/to/my/hooks",
},
hooksync can also be used from the command line, with the same optional PATH argument.
hooksync
# or with arguments
hooksync /path/to/my/hooks
- fs-promise-util - Promisified file-op in Node (soon to be native).
Feel free to contribute on GitHub.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Austin Meyers - Owner - arm22
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.