// *************************************
//
//   TemplateCache Task
//
// *************************************

// -------------------------------------
//   Modules
// -------------------------------------
//
// gulp-ng-html2js              : Caches html files into angularJs modules
// gulp-concat                  : Merge multiple scripts into one
var html2Js = require('gulp-ng-html2js');
var concat = require('gulp-concat');

/**
 *
 * @param gulp
 * @param config
 * @returns {*}
 */
module.exports = function(gulp, config){
    return gulp.src(config.html2Js.src)
        .pipe(html2Js(config.html2Js.settings))
        .pipe(concat(config.html2Js.filename))
        .pipe(gulp.dest(config.html2Js.dest))
};