husky
Advanced tools
Comparing version 0.4.0 to 0.4.1
#!/usr/bin/env node | ||
// Run when package is installed | ||
var fs = require('fs') | ||
var husky = require('../src/') | ||
@@ -10,5 +11,8 @@ | ||
husky.create(dir, 'pre-commit', 'npm run precommit') | ||
husky.create(dir, 'pre-push', 'npm run prepush') | ||
console.log(' done\n') | ||
if (fs.existsSync(dir)) { | ||
husky.create(dir, 'pre-commit', 'npm run precommit') | ||
husky.create(dir, 'pre-push', 'npm run prepush') | ||
console.log(' done\n') | ||
} else { | ||
console.log(' can\'t find .git/hooks/') | ||
} |
{ | ||
"name": "husky", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Prevents bad commit or push (git hooks, pre-commit, pre-push and all that stuff...)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,4 +25,4 @@ # 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) | ||
Both npm scripts are optional, existing hooks aren't replaced and adding `-n` to your git commands lets you bypass hooks. | ||
_Both npm scripts are optional, existing hooks aren't replaced and adding `-n` to your git commands lets you bypass hooks._ | ||
To uninstall husky, simply run `npm rm husky --save-dev`. | ||
_To uninstall husky, simply run `npm rm husky --save-dev`._ |
5288
85
3