diff options
Diffstat (limited to 'node_modules/postcss-svgo')
| -rw-r--r-- | node_modules/postcss-svgo/README.md | 31 | ||||
| -rw-r--r-- | node_modules/postcss-svgo/package.json | 9 | ||||
| -rw-r--r-- | node_modules/postcss-svgo/src/index.js | 2 | ||||
| -rw-r--r-- | node_modules/postcss-svgo/types/index.d.ts | 3 |
4 files changed, 22 insertions, 23 deletions
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/ diff --git a/node_modules/postcss-svgo/package.json b/node_modules/postcss-svgo/package.json index 55e4e4a2..c7167d7d 100644 --- a/node_modules/postcss-svgo/package.json +++ b/node_modules/postcss-svgo/package.json @@ -1,6 +1,6 @@ { "name": "postcss-svgo", - "version": "6.0.0", + "version": "6.0.1", "description": "Optimise inline SVG with PostCSS.", "main": "src/index.js", "types": "types/index.d.ts", @@ -28,7 +28,7 @@ "repository": "cssnano/cssnano", "dependencies": { "postcss-value-parser": "^4.2.0", - "svgo": "^3.0.2" + "svgo": "^3.0.5" }, "bugs": { "url": "https://github.com/cssnano/cssnano/issues" @@ -37,9 +37,10 @@ "node": "^14 || ^16 || >= 18" }, "devDependencies": { - "postcss": "^8.2.15" + "pleeease-filters": "^4.0.0", + "postcss": "^8.4.32" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }
\ No newline at end of file diff --git a/node_modules/postcss-svgo/src/index.js b/node_modules/postcss-svgo/src/index.js index a40850c8..57df665d 100644 --- a/node_modules/postcss-svgo/src/index.js +++ b/node_modules/postcss-svgo/src/index.js @@ -114,7 +114,7 @@ function minify(decl, opts, postcssResult) { decl.value = minified.toString(); } -/** @typedef {{encode?: boolean, plugins?: object[]} & import('svgo').Config} Options */ +/** @typedef {{encode?: boolean} & import('svgo').Config} Options */ /** * @type {import('postcss').PluginCreator<Options>} * @param {Options} opts diff --git a/node_modules/postcss-svgo/types/index.d.ts b/node_modules/postcss-svgo/types/index.d.ts index 0dcd6108..d12f3349 100644 --- a/node_modules/postcss-svgo/types/index.d.ts +++ b/node_modules/postcss-svgo/types/index.d.ts @@ -1,5 +1,5 @@ export = pluginCreator; -/** @typedef {{encode?: boolean, plugins?: object[]} & import('svgo').Config} Options */ +/** @typedef {{encode?: boolean} & import('svgo').Config} Options */ /** * @type {import('postcss').PluginCreator<Options>} * @param {Options} opts @@ -11,7 +11,6 @@ declare namespace pluginCreator { } type Options = { encode?: boolean; - plugins?: object[]; } & import('svgo').Config; declare var postcss: true; import { encode } from "./lib/url"; |
