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')); - - }); +})