From 3cb9bd42593e02675330e82533130bfd94ce4e75 Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Sun, 10 Nov 2019 19:46:06 +0100 Subject: [PATCH] fix css minify and hash --- gulpfile.js | 26 ++++---------------------- src/css/main.css | 2 +- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 634782d..efd00dd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -199,16 +199,12 @@ var buildStyles = function (done) { remove: true }) ])) - .pipe(header(banner.main, {package: package})) - .pipe(dest(paths.styles.output)) //.pipe(rename({suffix: '.min'})) .pipe(postcss([ - minify({ - discardComments: { - removeAll: true - } - }) + minify() ])) + .pipe(header(banner.main, {package: package})) + .pipe(hashsrc({build_dir:paths.output,src_path:'src',hash_len:"6",query_name:"v"})) .pipe(dest(paths.styles.output)); }; @@ -246,19 +242,6 @@ var updateAssetVersion = function (done) { .pipe(dest(paths.output)); }; -// updates version in all assets -var updateCssVersion = function (done) { - return src(paths.styles.input) - .pipe(hashsrc({build_dir:paths.output,src_path:'src',hash_len:"6",query_name:"v"})) - .pipe(dest(paths.styles.output)); -}; - -// updates version in all assets -var updateCssVersion = function (done) { - return src(paths.styles.input) - .pipe(hashsrc({build_dir:paths.output,src_path:'src',hash_len:"6",query_name:"v"})) - .pipe(dest(paths.styles.output)); -}; // Watch for changes to the src directory var startServer = function (done) { @@ -303,11 +286,10 @@ exports.default = series( copyFiles, buildScripts, lintScripts, - buildStyles, buildSVGs ), + buildStyles, updateAssetVersion, - updateCssVersion, ); // Watch and reload diff --git a/src/css/main.css b/src/css/main.css index cb25984..e9ef6b4 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -8037,7 +8037,7 @@ body { @media screen and (max-width:450px) { .marginAuto { - margin-bottom: 0px!important; + margin-bottom: 0!important; width: 100%!important; border-radius: 2px 2px 0 0; }