// *************************************
//
//   Html Task
//
// *************************************

// -------------------------------------
//   Modules
// -------------------------------------
//
// imagemin              : Image optimizer
var gUtil = require('gulp-util');
var router = require('front-router');
var processHtml = require('gulp-processhtml');

module.exports = function (gulp, config) {
    if (gUtil.env.release === true) {
        return gUtil.log(gUtil.colors.yellow("No html to build as working on release"));
    } else {
        return gulp.src(config.html.src)
            .pipe(router(config.html.settings.frontRouter))
            .pipe(processHtml(config.html.settings.processHtml))
            .pipe(gulp.dest(config.html.dest))
    }
};