Détail du package

git-pre-hooks

node-modules2.2kMIT1.2.1

Automatically install git pre hooks in your git repository that run your task

git, hooks, commit, release

readme

git-pre-hooks

NPM version node version Gittip

Automatically install git pre hooks in your git repository that run your task.

Installation

$ npm install git-pre-hooks --save-dev

Usage

First install git-pre-hooks from npm.

npm install git-pre-hooks --save-dev

Then add git-pre-hooks config in your package.json:

"git-pre-hooks": {
  "pre-commit": "make jshint",
  "pre-push": "make test",
  "pre-release": ["make test", "make build", "make test-build"],
  "post-release": "npm publish"
}

pre-release & post-release hook

If you are using git-extras, git-pre-hooks also support pre-release and post-release hook. Please make sure you install git-extras after 2014/12/03.

One-liner:

$ (cd /tmp && git clone --depth 1 https://github.com/tj/git-extras.git && cd git-extras && sudo make install)

License

MIT

changelog

1.2.1 / 2018-12-20

others

1.2.0 / 2015-09-27

  • support post release

1.1.1 / 2014-12-16

  • exit 1 when error

1.1.0 / 2014-12-03

  • change config field to git-pre-hooks

1.0.2 / 2014-12-02

  • pipe stdout
  • fix uninstall

1.0.0 / 2014-12-02

  • init