From 27552a2e9cfc3b5ae706ed922d49faff0d8803fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Mon, 8 Jun 2015 01:06:08 +0200 Subject: [PATCH] Cache linted files --- client/gulpfile.js | 5 ++++- client/package.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/gulpfile.js b/client/gulpfile.js index b34f1bc1..2b3599cd 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -17,6 +17,7 @@ var babelify = require('babelify'); var strictify = require('strictify'); var watchify = require('watchify'); var merge = require('merge-stream'); +var cache = require('gulp-cached'); var argv = require('yargs') .alias('p', 'production') @@ -87,6 +88,7 @@ function js(watch) { gulp.task('lint', function() { return gulp.src('src/js/**/*.{js,jsx}') + .pipe(cache('lint')) .pipe(eslint()) .pipe(eslint.format()) .pipe(eslint.failOnError()); @@ -108,8 +110,9 @@ gulp.task('gzip', ['html', 'css', 'js', 'fonts'], function() { .pipe(gulp.dest('dist/gz')); }); -gulp.task('gzip:watch', ['lint'], function() { +gulp.task('gzip:watch', function() { return gulp.src('dist/**/*.{html,css,js}') + .pipe(cache('gzip')) .pipe(gzip()) .pipe(gulp.dest('dist/gz')); }); diff --git a/client/package.json b/client/package.json index 097f91d9..d487cc9f 100644 --- a/client/package.json +++ b/client/package.json @@ -11,6 +11,7 @@ "eslint-plugin-react": "^2.4.0", "gulp": "~3.8.10", "gulp-autoprefixer": "2.2.0", + "gulp-cached": "^1.1.0", "gulp-concat": "~2.5.2", "gulp-eslint": "0.13.2", "gulp-gzip": "0.0.8",