Skip to content

Instantly share code, notes, and snippets.

@azu
Last active July 27, 2016 07:56
Show Gist options
  • Save azu/e2cefd92af8c8797ecaf457ff8ce40e2 to your computer and use it in GitHub Desktop.
Save azu/e2cefd92af8c8797ecaf457ff8ce40e2 to your computer and use it in GitHub Desktop.
git pre-push hook: npm test

git pre-push hook for npm test

Installation

curl https://gist.githubusercontent.com/azu/e2cefd92af8c8797ecaf457ff8ce40e2/raw/8456eb350576f6ec3e0042c38f76decd83e5b158/pre-push > .git/hooks/pre-push
chmod +x .git/hooks/pre-push

Usage

git push 
#!/bin/sh
npm test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment