-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synta checking, unit testing and autocompiling when commiting the js …
…file
- Loading branch information
1 parent
08e52e1
commit cba68cd
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
#!/usr/bin/env sh | ||
grunt | ||
exit $? | ||
|
||
command() | ||
{ | ||
$@ | ||
code=$? | ||
if [ $code -gt 0 ] | ||
then | ||
exit $code | ||
fi | ||
} | ||
|
||
changed=`git diff --name-only | grep angular-xml.js` | ||
|
||
if [ $changed ] | ||
then | ||
command npm run-script jshint | ||
command npm run-script karma | ||
command npm run-script compile | ||
git add angular-xml.min.js | ||
fi | ||
|
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