Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d17b95b
commit 786fb37
Showing
4 changed files
with
61 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* ----------------------------------------------------------- | ||
* jshint | ||
* ----------------------------------------------------------- | ||
* | ||
* Run jshint against JS files | ||
* in the project | ||
* | ||
*/ | ||
|
||
var gulp = require( 'gulp' ) | ||
, argv = require( 'yargs' ).argv | ||
, jshint = require( 'gulp-jshint' ) | ||
, notify = require( 'gulp-notify' ) | ||
; | ||
|
||
// parse a file or run default on all ph | ||
var glob = ( argv.file ) ? argv.file : [ | ||
'./_private/js/**/*.js', | ||
]; | ||
|
||
|
||
gulp.task( 'jshint', function() { | ||
|
||
gulp.src( glob ) | ||
|
||
.pipe( jshint( '.jshintrc' ) ) | ||
|
||
.pipe( jshint.reporter( 'jshint-stylish' ) ) | ||
|
||
.pipe( jshint.reporter( 'fail' ) ) | ||
|
||
.on( 'error', notify.onError( { | ||
|
||
message: '<%= error.message %>', | ||
sound: 'Funk', | ||
title: 'jshint error' | ||
|
||
} ) ); | ||
|
||
} ); |