🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

postcss-svgo

Package Overview
Dependencies
Maintainers
7
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-svgo - npm Package Compare versions

Comparing version

to
6.0.1

9

package.json
{
"name": "postcss-svgo",
"version": "6.0.0",
"version": "6.0.1",
"description": "Optimise inline SVG with PostCSS.",

@@ -31,3 +31,3 @@ "main": "src/index.js",

"postcss-value-parser": "^4.2.0",
"svgo": "^3.0.2"
"svgo": "^3.0.5"
},

@@ -41,7 +41,8 @@ "bugs": {

"devDependencies": {
"postcss": "^8.2.15"
"pleeease-filters": "^4.0.0",
"postcss": "^8.4.32"
},
"peerDependencies": {
"postcss": "^8.2.15"
"postcss": "^8.4.31"
}
}

@@ -66,23 +66,22 @@ # [postcss][postcss]-svgo

```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
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
removeComments: false,
cleanupNumericValues: {
floatPrecision: 2
}
}
}
}, {
convertColors: {
names2hex: false,
rgb2hex: false
}
}]
};
postcss([ svgo(opts) ]).process(css).then(function (result) {
postcss([ svgo(opts) ]).process(css).then((result) => {
console.log(result.css)

@@ -111,2 +110,2 @@ });

[postcss]: https://github.com/postcss/postcss
[plugins]: https://github.com/svg/svgo/tree/master/plugins
[plugins]: https://svgo.dev/docs/plugins/

@@ -117,3 +117,3 @@ 'use strict';

}
/** @typedef {{encode?: boolean, plugins?: object[]} & import('svgo').Config} Options */
/** @typedef {{encode?: boolean} & import('svgo').Config} Options */
/**

@@ -120,0 +120,0 @@ * @type {import('postcss').PluginCreator<Options>}

export = pluginCreator;
/** @typedef {{encode?: boolean, plugins?: object[]} & import('svgo').Config} Options */
/** @typedef {{encode?: boolean} & import('svgo').Config} Options */
/**

@@ -14,5 +14,4 @@ * @type {import('postcss').PluginCreator<Options>}

encode?: boolean;
plugins?: object[];
} & import('svgo').Config;
declare var postcss: true;
import { encode } from "./lib/url";