From ff91535635c03a579a75ca27af90d794baa9bce8 Mon Sep 17 00:00:00 2001 From: William Toohey Date: Sat, 6 Feb 2016 14:45:51 +1000 Subject: [PATCH] Change linting to be its own task, run before release --- gulpfile.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 6bb2574..b7ecb80 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -40,9 +40,6 @@ gulp.task("mp3", function () { gulp.task("minify", function () { return gulp.src("src/js/*.js") - // Enable later - .pipe(jshint('.jshintrc')) - .pipe(jshint.reporter('default')) .pipe(sourcemaps.init()) .pipe(babel()) .pipe(uglify()) @@ -51,6 +48,12 @@ gulp.task("minify", function () { .pipe(gulp.dest("lib")); }); +gulp.task("lint", function () { + return gulp.src("src/js/*.js") + .pipe(jshint('.jshintrc')) + .pipe(jshint.reporter('default')); +}); + gulp.task('watch', ['default'], function() { gulp.watch('src/css/*.css', ['css']); gulp.watch('src/js/*.js', ['minify']); @@ -65,7 +68,7 @@ gulp.task('clean', function() { 'release']); }); -gulp.task('release', ['default'], function() { +gulp.task('release', ['default', 'lint'], function() { gulp.src([ 'css/hues-min.css', 'lib/hues-min.js',