From f06956efd2dc4bf77244a9fcce2b883a00b925af Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 21 Dec 2023 22:46:53 +0800 Subject: updated node modules --- node_modules/postcss-svgo/README.md | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'node_modules/postcss-svgo/README.md') diff --git a/node_modules/postcss-svgo/README.md b/node_modules/postcss-svgo/README.md index ea447bff..19bd0eb8 100644 --- a/node_modules/postcss-svgo/README.md +++ b/node_modules/postcss-svgo/README.md @@ -63,27 +63,26 @@ below. Note that you can either disable the plugin by setting it to `false`, or pass different options to change the default behaviour. ```js -var postcss = require('postcss'); -var svgo = require('postcss-svgo'); +const postcss = require('postcss'); +const svgo = require('postcss-svgo'); -var opts = { +const opts = { plugins: [{ - removeDoctype: false - }, { - removeComments: false - }, { - cleanupNumericValues: { - floatPrecision: 2 - } - }, { - convertColors: { - names2hex: false, - rgb2hex: false + name: 'preset-default', + params: { + overrides: { + removeViewBox: false, + removeComments: false, + cleanupNumericValues: { + floatPrecision: 2 + } + } } }] }; -postcss([ svgo(opts) ]).process(css).then(function (result) { + +postcss([ svgo(opts) ]).process(css).then((result) => { console.log(result.css) }); ``` @@ -107,4 +106,4 @@ See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTOR MIT © [Ben Briggs](http://beneb.info) [postcss]: https://github.com/postcss/postcss -[plugins]: https://github.com/svg/svgo/tree/master/plugins +[plugins]: https://svgo.dev/docs/plugins/ -- cgit v1.2.3