From 8191529f80ec45c34a3681605109cc6cd4e2a28c Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Sun, 27 Aug 2017 13:09:09 -0400 Subject: [PATCH] Updating gulpfile. Adding jshint and plumber to have a lint checker for the js files and plumber is to keep the gulp task running even if the jshint runs into an error. --- gulpfile.js | 13 ++++++++----- package.json | 4 +++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 8009dc1..863192a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,12 +1,15 @@ -var gulp = require('gulp'), - watch = require('gulp-watch'), - concat = require('gulp-concat'), - uglify = require('gulp-uglify'); +var gulp = require('gulp'), + concat = require('gulp-concat'), + uglify = require('gulp-uglify'), + jshint = require('gulp-jshint'), + plumber = require('gulp-plumber'); gulp.task('scripts', function(){ - gulp.src(['./js/models/*.js', './js/collections/*.js', './js/views/*.js']) + gulp.src(['js/models/*.js', './js/collections/*.js', './js/views/*.js']) .pipe(concat('glmApp.js')) + .pipe(plumber()) .pipe(uglify()) + .pipe(jshint()) .pipe(gulp.dest('./js/')); }); diff --git a/package.json b/package.json index cb0c0e5..035daec 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,9 @@ "devDependencies": { "gulp": "^3.9.1", "gulp-concat": "^2.6.1", + "gulp-jshint": "^2.0.4", + "gulp-plumber": "^1.1.0", "gulp-uglify": "^3.0.0", - "gulp-watch": "^4.3.11" + "jshint": "^2.9.5" } } -- 2.17.1