Comparing version 0.8.1 to 0.9.0
// Run when package is installed | ||
var fs = require('fs') | ||
var husky = require('../src/') | ||
var hooks = require('../hooks.json') | ||
@@ -12,10 +13,8 @@ console.log('\033[36m%s\033[0m', 'husky') | ||
} else { | ||
husky.create(dir, 'pre-commit', 'precommit') | ||
husky.create(dir, 'pre-push', 'prepush') | ||
husky.create(dir, 'post-merge', 'postmerge') | ||
husky.create(dir, 'post-rewrite', 'postrewrite') | ||
husky.create(dir, 'pre-rebase', 'prerebase') | ||
hooks.forEach(function (hook) { | ||
script = hook.replace(/-/g, '') | ||
husky.create(dir, hook, script) | ||
}) | ||
console.log(' done\n') | ||
} | ||
}) |
// Run when package is uninstalled | ||
var husky = require('../src/') | ||
var hooks = require('../hooks.json') | ||
@@ -9,10 +10,7 @@ console.log('\033[36m%s\033[0m', 'husky') | ||
if (!err) { | ||
husky.remove(dir, 'pre-commit') | ||
husky.remove(dir, 'pre-push') | ||
husky.remove(dir, 'post-merge') | ||
husky.remove(dir, 'post-rewrite') | ||
husky.remove(dir, 'pre-rebase') | ||
hooks.forEach(function (hook) { | ||
husky.remove(dir, hook) | ||
}) | ||
console.log(' done\n') | ||
} | ||
}) |
{ | ||
"name": "husky", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"description": "Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,2 +7,3 @@ # husky [![](http://img.shields.io/npm/dm/husky.svg?style=flat)](https://www.npmjs.org/package/husky) [![npm version](https://badge.fury.io/js/husky.svg)](http://badge.fury.io/js/husky) [![Build Status](https://travis-ci.org/typicode/husky.svg?branch=master)](https://travis-ci.org/typicode/husky) | ||
```bash | ||
@@ -30,2 +31,2 @@ $ npm install husky --save-dev | ||
Missing a Git hook? Feel free to create an [issue](https://github.com/typicode/husky/issues). | ||
Supported hooks are listed [here](hooks) (simply remove `-` when adding them to your `package.json`) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7356
10
146
31