diff --git a/gulpfile.js b/gulpfile.js index 66a8924..37da2cc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -48,6 +48,7 @@ let { src, dest } = require("gulp"), sass = require("gulp-dart-sass"), minify_inline = require("gulp-minify-inline"), autoprefixer = require("gulp-autoprefixer"), + htmlmin = require("gulp-htmlmin"), group_css_media = require("gulp-group-css-media-queries"), clean_css = require("gulp-clean-css"), rename = require("gulp-rename"), @@ -83,6 +84,14 @@ function html() { .pipe(filesinclude()) // include templates for gulp .pipe(minify_inline()) // minifies inline JS and CSS .pipe(webp_html()) + .pipe(htmlmin({ + collapseWhitespace: true, + removeComments: true, + removeCommentsFromCDATA: true, + removeEmptyAttributes: true, + removeEmptyElements: true, + collapseBooleanAttributes: true + })) .pipe(dest(path.build.html)) .pipe(browsersync.stream()) // update live sync } @@ -147,11 +156,10 @@ function images() { ) .pipe(dest(path.build.img)) // create webp images .pipe(dest(path.src.img)) // return to other images - .pipe(image_min({ + .pipe(imagemin({ progressive: true, - interlaced: true, - svgoPlugins: [{ removeViewBox: true }], - optimizationLevel: 4 // from 0 to 7 + svgoPlugins: [{ removeViewBox: false }], + optimizationLevel: 3 // from 0 to 7 }) ) .pipe(dest(path.build.img)) diff --git a/package.json b/package.json index 70f095c..c178125 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "Gulp HTML Template", + "name": "w.dottedbuy.com", "version": "1.0.0", - "description": "Gulp-HTML-Template", + "description": "", "main": "gulpfile.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "author": "Vitalii Tereshchuk", + "author": "", "license": "ISC", "devDependencies": { "autoprefixer": "^10.2.5", @@ -15,11 +15,15 @@ "gulp": "^4.0.2", "gulp-autoprefixer": "^7.0.1", "gulp-clean-css": "^4.3.0", + "gulp-concat": "^2.6.1", + "gulp-cssmin": "^0.2.0", "gulp-dart-sass": "^1.0.2", "gulp-file-include": "^2.3.0", "gulp-fonter": "^0.3.0", "gulp-group-css-media-queries": "^1.2.2", + "gulp-htmlmin": "^5.0.1", "gulp-imagemin": "^7.1.0", + "gulp-minifier": "^3.5.0", "gulp-minify-inline": "^1.1.0", "gulp-notify": "^4.0.0", "gulp-rename": "^2.0.0",