Skip to content

songwuk/s-githooks

Repository files navigation

s-githooks

provides a configurable git-hooks

  • Implement custom git-hooks

NPM version

Install

npm install s-githooks --save-dev

Usage

Add s-githooks to your package.json Fill it

For example:

{
  "s-githooks": {
    "pre-commit": "npx lint-staged",
    "commit-msg": "npm run verifycommit"
  }
}

Run the CLI script to update the git hooks with the commands from the config:

# [Optional] These 2 steps can be skipped for non-husky users
git config core.hooksPath .git/hooks/
rm -rf .git/hooks

# Update ./git/hooks
npx s-githooks

Thanks

License

MIT License © 2023 Song wuk

About

provides a configurable git-hooks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published