Skip to content

Instantly share code, notes, and snippets.

@tgfjt
Created January 7, 2014 06:59
Show Gist options
  • Save tgfjt/8295630 to your computer and use it in GitHub Desktop.
Save tgfjt/8295630 to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
gulp.task('lint', function() {
gulp.src('./js/*.js')
.pipe(jshint())
.pipe(jshint('./.jshintrc'))
.pipe(jshint.reporter(stylish));
});
// Default Task
gulp.task('default', function() {
gulp.run('lint');
// Watch Files
gulp.watch('./js/*.js', function() {
gulp.run('lint');
});
});
{
"name": "basic-validate-gulp",
"version": "0.0.1",
"scripts": {
"start": "gulp"
},
"devDependencies": {
"gulp": "~3.2.1",
"gulp-jshint": "~1.3.2",
"jshint-stylish": "~0.1.4"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment