Skip to content

Commit

Permalink
run jshint on modified js files
Browse files Browse the repository at this point in the history
  • Loading branch information
ethers committed May 5, 2014
1 parent 4e1de7f commit e1989ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion package.json
Expand Up @@ -9,7 +9,9 @@
"express": "3.1.0",
"jade": "*",
"mongodb": "*",
"bitcoinjs-lib": "https://github.com/bitfloor/bitcoinjs-lib/tarball/master",
"bitcoinjs-lib": "https://github.com/bitfloor/bitcoinjs-lib/tarball/master"
},
"devDependencies": {
"jshint": "~2.5.0"
},
"main": "main.js",
Expand All @@ -25,5 +27,8 @@
},
"engines": {
"node": "*"
},
"scripts": {
"test": "./script/jshint.sh"
}
}
4 changes: 4 additions & 0 deletions script/jshint.sh
@@ -0,0 +1,4 @@
#!/bin/bash

# run jshint on modified js files
git diff $(git merge-base HEAD origin/HEAD) --name-only --diff-filter=ACM | grep -v node_modules | grep ".js$" | xargs node_modules/.bin/jshint

0 comments on commit e1989ff

Please sign in to comment.