var gulp = require('gulp'),
    htmlmin = require('gulp-htmlmin'),
    imgRetina = require('gulp-img-retina');
    // runSequence = require('run-sequence');

gulp.task('process-html', function(callback) {
    runSequence('min-html', 'retina-html',
        callback
    )
})

gulp.task('copy-html', function(){
  return gulp.src('public/**/*.html')
  .pipe(gulp.dest('dist'))
})

var retinaOpts = {
    suffix: {1: '', 2: '@2x'}
};

gulp.task('min-html', function() {
    return gulp.src('public/**/*.html')
        .pipe(htmlmin({
            collapseWhitespace: true
        }))
        .pipe(gulp.dest('dist'));
})
// min-html was taking forever

gulp.task('retina-html', function() {
    return gulp.src(['dist/**/*.html',  '!dist/events/2015*/**', '!dist/events/2016*/**'])
        .pipe(imgRetina(retinaOpts))
        .on('error', function(e) {
            console.log(e.message);
        })
        .pipe(gulp.dest('dist'));
})

var gulp = require('gulp'),
    htmlmin = require('gulp-htmlmin'),
    imgRetina = require('gulp-img-retina');
    // runSequence = require('run-sequence');




gulp.task('copy-html', function(){
  return gulp.src('public/**/*.html')
  .pipe(gulp.dest('dist'))
})

var retinaOpts = {
    suffix: {1: '', 2: '@2x'}
};

gulp.task('min-html', function() {
    return gulp.src('public/**/*.html')
        .pipe(htmlmin({
            collapseWhitespace: true
        }))
        .pipe(gulp.dest('dist'));
})
// min-html was taking forever

gulp.task('retina-html', function() {
    return gulp.src(['dist/**/*.html',  '!dist/events/2015*/**', '!dist/events/2016*/**'])
        .pipe(imgRetina(retinaOpts))
        .on('error', function(e) {
            console.log(e.message);
        })
        .pipe(gulp.dest('dist'));
})

gulp.task('process-html', gulp.series('min-html', 'retina-html'));

Fix issue with gulp sequence
Fix issue with gulp sequence

Signed-off-by: Matt Stratton <39982728c5a806c113d54b69a3f65ecf65602e8a@gmail.com>
