From 759d9dc2ca059b4a990ca6aa377058a7ff767e4d Mon Sep 17 00:00:00 2001 From: cienislaw Date: Sat, 12 Apr 2025 10:02:25 +0200 Subject: [PATCH 1/2] Don't create empty files Sass can create 0 byte files in destination. This change removes them from pipeline before writing to destination location. --- gulpfile.js | 3 +++ package.json | 1 + 2 files changed, 4 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 4cdf25c..40e61d7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,6 +10,7 @@ var sourcemaps = require('gulp-sourcemaps'); var notify = require('gulp-notify'); var gulpif = require('gulp-if'); var options = require('./package.json').options; +var clip = require('gulp-clip-empty-files'); var createFolders = [ './cache/', @@ -64,6 +65,8 @@ gulp.task('compile-css', function() { ) .pipe(autoprefixer()) .pipe(gulpif(options.sourcemaps, sourcemaps.write('./'))) + // remove empty files + .pipe(clip()) .pipe(gulp.dest('./css/')) .pipe(displayNotification({ message: 'Theme CSS compilation successful for ' + options.themeName, diff --git a/package.json b/package.json index 24cde05..5c0f6f5 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "glob-all": "^3.1.0", "gulp": "^4.0.1", "gulp-autoprefixer": "^7.0.1", + "gulp-clip-empty-files": "^0.1.2", "gulp-eslint": "^6.0.0", "gulp-if": "^3.0.0", "gulp-notify": "^3.2.0", From df0a19be7556ddaf441401e9a0b0800d9fb8122a Mon Sep 17 00:00:00 2001 From: cienislaw Date: Sat, 12 Apr 2025 10:03:55 +0200 Subject: [PATCH 2/2] Delete 0 byte css files and their directories Removed 0 byte css files and their directories after making sure that compile-css won't create them again. --- .../blockbestsellers/blockbestsellers.css | 0 css/modules/blockbestsellers/index.php | 40 ------------------- .../blockcurrencies/blockcurrencies.css | 0 css/modules/blockcurrencies/index.php | 40 ------------------- css/modules/blocklanguages/blocklanguages.css | 0 css/modules/blocklanguages/index.php | 40 ------------------- .../blockmyaccountfooter/blockmyaccount.css | 0 css/modules/blockmyaccountfooter/index.php | 40 ------------------- .../blocknewproducts/blocknewproducts.css | 0 css/modules/blocknewproducts/index.php | 40 ------------------- .../blocknewsletter/blocknewsletter.css | 3 -- css/modules/blocknewsletter/index.php | 40 ------------------- css/modules/blockspecials/blockspecials.css | 0 css/modules/blockspecials/index.php | 40 ------------------- css/print.css | 0 15 files changed, 283 deletions(-) delete mode 100644 css/modules/blockbestsellers/blockbestsellers.css delete mode 100644 css/modules/blockbestsellers/index.php delete mode 100644 css/modules/blockcurrencies/blockcurrencies.css delete mode 100644 css/modules/blockcurrencies/index.php delete mode 100644 css/modules/blocklanguages/blocklanguages.css delete mode 100644 css/modules/blocklanguages/index.php delete mode 100644 css/modules/blockmyaccountfooter/blockmyaccount.css delete mode 100644 css/modules/blockmyaccountfooter/index.php delete mode 100644 css/modules/blocknewproducts/blocknewproducts.css delete mode 100644 css/modules/blocknewproducts/index.php delete mode 100644 css/modules/blocknewsletter/blocknewsletter.css delete mode 100644 css/modules/blocknewsletter/index.php delete mode 100644 css/modules/blockspecials/blockspecials.css delete mode 100644 css/modules/blockspecials/index.php delete mode 100644 css/print.css diff --git a/css/modules/blockbestsellers/blockbestsellers.css b/css/modules/blockbestsellers/blockbestsellers.css deleted file mode 100644 index e69de29..0000000 diff --git a/css/modules/blockbestsellers/index.php b/css/modules/blockbestsellers/index.php deleted file mode 100644 index 38c73f4..0000000 --- a/css/modules/blockbestsellers/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author PrestaShop SA - * @copyright 2017-2024 thirty bees - * @copyright 2007-2016 PrestaShop SA - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * PrestaShop is an internationally registered trademark & property of PrestaShop SA - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/css/modules/blockcurrencies/blockcurrencies.css b/css/modules/blockcurrencies/blockcurrencies.css deleted file mode 100644 index e69de29..0000000 diff --git a/css/modules/blockcurrencies/index.php b/css/modules/blockcurrencies/index.php deleted file mode 100644 index 38c73f4..0000000 --- a/css/modules/blockcurrencies/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author PrestaShop SA - * @copyright 2017-2024 thirty bees - * @copyright 2007-2016 PrestaShop SA - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * PrestaShop is an internationally registered trademark & property of PrestaShop SA - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/css/modules/blocklanguages/blocklanguages.css b/css/modules/blocklanguages/blocklanguages.css deleted file mode 100644 index e69de29..0000000 diff --git a/css/modules/blocklanguages/index.php b/css/modules/blocklanguages/index.php deleted file mode 100644 index 38c73f4..0000000 --- a/css/modules/blocklanguages/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author PrestaShop SA - * @copyright 2017-2024 thirty bees - * @copyright 2007-2016 PrestaShop SA - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * PrestaShop is an internationally registered trademark & property of PrestaShop SA - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/css/modules/blockmyaccountfooter/blockmyaccount.css b/css/modules/blockmyaccountfooter/blockmyaccount.css deleted file mode 100644 index e69de29..0000000 diff --git a/css/modules/blockmyaccountfooter/index.php b/css/modules/blockmyaccountfooter/index.php deleted file mode 100644 index 38c73f4..0000000 --- a/css/modules/blockmyaccountfooter/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author PrestaShop SA - * @copyright 2017-2024 thirty bees - * @copyright 2007-2016 PrestaShop SA - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * PrestaShop is an internationally registered trademark & property of PrestaShop SA - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/css/modules/blocknewproducts/blocknewproducts.css b/css/modules/blocknewproducts/blocknewproducts.css deleted file mode 100644 index e69de29..0000000 diff --git a/css/modules/blocknewproducts/index.php b/css/modules/blocknewproducts/index.php deleted file mode 100644 index 38c73f4..0000000 --- a/css/modules/blocknewproducts/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author PrestaShop SA - * @copyright 2017-2024 thirty bees - * @copyright 2007-2016 PrestaShop SA - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * PrestaShop is an internationally registered trademark & property of PrestaShop SA - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/css/modules/blocknewsletter/blocknewsletter.css b/css/modules/blocknewsletter/blocknewsletter.css deleted file mode 100644 index a786b89..0000000 --- a/css/modules/blocknewsletter/blocknewsletter.css +++ /dev/null @@ -1,3 +0,0 @@ -#blocknewsletter-captcha { - display: none; -} \ No newline at end of file diff --git a/css/modules/blocknewsletter/index.php b/css/modules/blocknewsletter/index.php deleted file mode 100644 index 38c73f4..0000000 --- a/css/modules/blocknewsletter/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author PrestaShop SA - * @copyright 2017-2024 thirty bees - * @copyright 2007-2016 PrestaShop SA - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * PrestaShop is an internationally registered trademark & property of PrestaShop SA - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/css/modules/blockspecials/blockspecials.css b/css/modules/blockspecials/blockspecials.css deleted file mode 100644 index e69de29..0000000 diff --git a/css/modules/blockspecials/index.php b/css/modules/blockspecials/index.php deleted file mode 100644 index 38c73f4..0000000 --- a/css/modules/blockspecials/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author PrestaShop SA - * @copyright 2017-2024 thirty bees - * @copyright 2007-2016 PrestaShop SA - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * PrestaShop is an internationally registered trademark & property of PrestaShop SA - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/css/print.css b/css/print.css deleted file mode 100644 index e69de29..0000000