Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Commit

Permalink
Remove html min for speed (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstratton committed Jan 30, 2017
1 parent 38efbc5 commit 0621b71
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions gulp/tasks/process-html.js
Original file line number Diff line number Diff line change
@@ -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'));

});
})

0 comments on commit 0621b71

Please sign in to comment.