Created
October 31, 2015 20:05
-
-
Save dgieselaar/785790c5221456fe45b1 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
changed_files="$(git diff --name-only --cached)" | |
check_run() { | |
echo "$changed_files" | grep -q '\.js$' && eval "$1" | |
} | |
check_run "npm run-script lint" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment