const gulp = require("gulp"), htmlmin = require("gulp-htmlmin"), minifyCss = require("gulp-minify-css"), sass = require("gulp-sass"), uglify = require("gulp-uglify"), babel = require("gulp-babel"), connect = require("gulp-connect"); removeUseStrict = require("gulp-remove-use-strict"); // gulp.task('default', () => { // console.log("default"); // }); gulp.task("html", () => { gulp.src("src/**/*.html") .pipe(htmlmin({ removeComments: true,//清除HTML注释 collapseWhitespace: true,//压缩HTML collapseBooleanAttributes: true,//省略布尔属性的值 ==> removeEmptyAttributes: true,//删除所有空格作属性值 ==> removeScriptTypeAttributes: false,//删除