Plato on Github
Report Home
html/minify.js
Maintainability
71.27
Lines of code
30
Difficulty
8.38
Estimated Errors
0.24
Function weight
By Complexity
By SLOC
'use strict'; var packagePath = __dirname + '/../../package.json'; var gulp = require('gulp'); var path = require('path'); var $ = require('gulp-load-plugins')({config: path.normalize(packagePath)}); var config = { name: 'html:minify', callback: callback }; module.exports = config; ///////////////////////////// /*jshint unused:false*/ function callback(settings, done) { var assets = $.useref.assets(); return gulp .src(settings.src) .pipe(assets) .pipe(assets.restore()) .pipe($.useref()) .pipe($.if('*.html', $.minifyHtml({empty: true}))) .pipe(gulp.dest(settings.paths.build)) .pipe($.size({title: 'html:minify'})); }