simple-git-hooks-runner
v1.1.1
Published
A utility library to facilitate running custom scripts or actions triggered by Git hooks.
Downloads
9
Maintainers
Readme
simple-git-hooks-runner
simple-git-hooks-runner
is a lightweight library for running git hooks with ease.
Installation
You can install simple-git-hooks-runner
via npm:
npm install simple-git-hooks-runner
Usage
import runGitHooks from 'simple-git-hooks-runner';
// Define your git hook actions
const hookActions = {
'pre-commit': [
async (git) => await git.add('.').commit('Auto-commit changes'),
],
// Add more hook actions as needed
};
// Run git hooks
runGitHooks('pre-commit', hookActions);
Features
- Simplifies running git hooks
- Flexible and customizable hook actions
- Works seamlessly with Node.js and cron scheduling
License
This project is licensed under the MIT License - see the LICENSE file for details.