summaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 852a627b..7f262af4 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,6 +1,6 @@
var gulp = require('gulp'),
concat = require('gulp-concat'),
- jshint = require('gulp-jshint');
+ eslint = require('gulp-eslint');
gulp.task('js', function() {
return gulp.src([
@@ -10,12 +10,25 @@ gulp.task('js', function() {
'js/services/**/*.js',
'js/filters/**/*.js'
])
- .pipe(jshint('.jshintrc'))
- .pipe(jshint.reporter('default'))
+ .pipe(eslint())
+ .pipe(eslint.format())
.pipe(concat('script.js'))
.pipe(gulp.dest('js/public'));
});
+gulp.task('eslint', function() {
+ return gulp.src([
+ 'js/main.js',
+ 'js/components/**/*.js',
+ 'js/models/**/*.js',
+ 'js/services/**/*.js',
+ 'js/filters/**/*.js'
+ ])
+ .pipe(eslint())
+ .pipe(eslint.format())
+ .pipe(eslint.failAfterError());
+})
+
gulp.task('watch', ['js'], function() {
gulp.watch('js/**/*.js', ['js']);
});