git-pre-hooks

1.2.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    383
    • latest

Version History

Package Sidebar

Install

npm i git-pre-hooks

Weekly Downloads

389

Version

1.2.1

License

MIT

Unpacked Size

10.7 kB

Total Files

11

Last publish

Collaborators

  • dead_horse