Fri Jan 19 2018
Copied to clipboard! Copy reply
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
return gulp.src(cfgsource.length ? cfgsource : 'build/*.html') //Vacuum up all the stuff listed in the config under "html" node
		.pipe($.template( tagsource )) //Run it through the templater once
		.pipe($.template( tagsource )) //Do it again to allow for compound templating
		.pipe((typeof moduleguides //Only if it has modules listed in the config (most don't)
		.pipe(args.size ? $.size() : $.util.noop()) //List the size if indicated in call args
		.pipe($.htmlmin({collapseWhitespace: true, removeComments: true, keepClosingSlash:true, minifyJS: true})) //minify it.
		.pipe(args.size ? $.size() : $.util.noop()) //Report its size
		.pipe($.rename(function renamehtml(path){... //Rename it to index if appropriate
		.pipe(gulpFilter(file => /index/.test(file.path) )) //Don't send anything but index to dest
		.pipe(gulp.dest('deploy' + (destext ? destext : ''))) //Dump it out where the config says to