From 262a0a6a0003c39f6a525af2ab6ac645a55d3201 Mon Sep 17 00:00:00 2001 From: Trevor Morris Date: Tue, 20 Aug 2024 13:48:48 +0100 Subject: [PATCH] fix: minify CSS and ignore deprecation warnings from stylelint --- package.json | 3 ++- postcss.config.js | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2c9184b..44fdbb6 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "scripts": { "clean": "rm -rf dist", - "11ty": "npx @11ty/eleventy", + "11ty": "npx @11ty/eleventy $npm_config_pathprefix", "css": "npx postcss ./src/_assets/css/site.css -o ./dist/css/site.css", "start": "npm run 11ty -- --serve --quiet & npm run css -- --watch", "prebuild": "npm run clean", @@ -47,6 +47,7 @@ "postcss": "^8.4.38", "postcss-cli": "^11.0.0", "postcss-import": "^16.1.0", + "cssnano": "^7.0.5", "standard": "^17.1.0", "stylelint": "^16.6.1", "stylelint-config-standard": "^36.0.0" diff --git a/postcss.config.js b/postcss.config.js index 8c956c6..25e52e0 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -2,9 +2,12 @@ module.exports = { plugins: [ require('postcss-import')({ plugins: [ - require('stylelint') + require('stylelint')({ + quietDeprecationWarnings: true + }) ] }), - require('autoprefixer') + require('autoprefixer'), + require('cssnano') ] }