Created
December 7, 2016 23:24
-
-
Save philipbeadle/0e3f200005587cde4938a8f53e63fefc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var path = require('path') | |
, scripts = require('../../') | |
, name = path.basename(__filename) | |
, project = scripts(); | |
project.run(name, process.argv.slice(2), function(err) { | |
if (err) { | |
console.error('Failed to exec ' + name + ' hook script') | |
process.exit(err.code); | |
} | |
}); | |
then in package.json | |
"git": { | |
"scripts": { | |
"pre-commit": "grunt test" | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment