From 0621b712c4c59ca37bde053a92af79b7520b26bc Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Mon, 30 Jan 2017 16:38:57 -0600 Subject: [PATCH] Remove html min for speed (#131) --- gulp/tasks/process-html.js | 39 ++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/gulp/tasks/process-html.js b/gulp/tasks/process-html.js index de4fc9133..672434efd 100644 --- a/gulp/tasks/process-html.js +++ b/gulp/tasks/process-html.js @@ -1,18 +1,37 @@ var gulp = require('gulp'), htmlmin = require('gulp-htmlmin'), - imgRetina = require('gulp-img-retina'); + imgRetina = require('gulp-img-retina'), + runSequence = require('run-sequence'); - var retinaOpts = { - // Your options here. - }; - gulp.task('process-html', function() { +gulp.task('process-html', function(callback) { + runSequence('copy-html', 'retina-html', + callback + ) +}) - return gulp.src(['public/**/*.html']) +gulp.task('copy-html', function(){ + return gulp.src('public/**/*.html') + .pipe(gulp.dest('staging')) +}) + +var retinaOpts = { + // Your options here. +}; + +// gulp.task('min-html', function() { +// return gulp.src('public/**/*.html') +// .pipe(htmlmin({ +// collapseWhitespace: true +// })) +// .pipe(gulp.dest('staging')); +// }) +// min-html was taking forever + +gulp.task('retina-html', function() { + return gulp.src(['staging/**/*.html']) .pipe(imgRetina(retinaOpts)) .on('error', function(e) { - console.log(e.message); + console.log(e.message); }) - .pipe(htmlmin({collapseWhitespace: true})) .pipe(gulp.dest('staging')); - - }); +})