-
-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added template inorder to run grunt lint only if there are staged changes. - Added grunt lint-nofix task to run linter in no-fix mode. - Fixed some linting changes too.
- Loading branch information
1 parent
f9e1885
commit 86476a4
Showing
5 changed files
with
46 additions
and
29 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
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
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
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 |
---|---|---|
|
@@ -108,6 +108,4 @@ if (typeof ac.createStereoPanner !== 'undefined') { | |
panner = Panner; | ||
} | ||
|
||
|
||
export default panner; | ||
|
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// hooks/pre-commit.js | ||
|
||
var exec = require('child_process').exec; | ||
// Executes shell commands synchronously | ||
var sh = require('child_process').execSync; | ||
|
||
exec('git diff --cached --quiet', function (err, stdout, stderr) { | ||
|
||
// only run if there are staged changes | ||
// i.e. what you would be committing if you ran "git commit" without "-a" option. | ||
if (err) { | ||
|
||
// stash unstaged changes - only test what's being committed | ||
sh('git stash --keep-index --quiet'); | ||
|
||
exec('grunt {{task}}', function (err, stdout, stderr) { | ||
|
||
console.log(stdout); | ||
|
||
// restore stashed changes | ||
sh('git stash pop --quiet'); | ||
|
||
var exitCode = 0; | ||
if (err) { | ||
console.log(stderr); | ||
exitCode = -1; | ||
} | ||
process.exit(exitCode); | ||
}); | ||
} | ||
|
||
}); |