{"name":"svgo","version":"3.3.5","keywords":["svgo","svg","optimize","minify"],"author":{"url":"https://github.com/deepsweet","name":"Kir Belevich","email":"kir@belevi.ch"},"license":"MIT","_id":"svgo@3.3.5","maintainers":[{"name":"deepsweet","email":"kir@belevi.ch"},{"name":"greli","email":"grelimail@gmail.com"},{"name":"trysound","email":"opensource@trysound.io"},{"name":"sethiii","email":"seth@falco.fun"}],"contributors":[{"url":"https://github.com/arikon","name":"Sergey Belov","email":"peimei@ya.ru"},{"url":"https://github.com/GreLI","name":"Lev Solntsev","email":"lev.sun@ya.ru"},{"url":"https://github.com/TrySound","name":"Bogdan Chadkin","email":"trysound@yandex.ru"},{"url":"https://falco.fun/","name":"Seth Falco","email":"seth@falco.fun"}],"homepage":"https://svgo.dev","bugs":{"url":"https://github.com/svg/svgo/issues"},"bin":{"svgo":"bin/svgo"},"dist":{"shasum":"8a3d9557ab2f386eca7e24760385849554985a1c","tarball":"http://registry-npm.ywwl.com/svgo/download/svgo-3.3.5.tgz","fileCount":78,"integrity":"sha512-8SQMzdrvWaD8deUmrnYB+ASyxBVgWUOilg+A75nE/76WdLpj6LopCwiAVvkzkcqy/9b7t2Mg7faFLjg0ZRcZ3w==","signatures":[{"sig":"MEQCIBkSGJ1mxnujVphPoAhUBleNQKpMbabv/MaQh4cJYTM3AiAfNxvvh8GOq8a9EDApweBnMKvKMM6Vq/NBz5Ggx4E6Kg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCeHLf8tqx59OpiT2kQYhnkT46TpRl2tGloDZfE4o38mAIhAI/X77fU5a6SF7EUas41T9Ybt58AFd2PNJ03mgNGsRRI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/svgo@3.3.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1310053,"size":321927,"noattachment":false,"key":"/svgo/-/svgo-3.3.5.tgz"},"jest":{"coveragePathIgnorePatterns":["fixtures"]},"main":"./lib/svgo-node.js","types":"./lib/svgo.d.ts","engines":{"node":">=14.0.0"},"funding":{"url":"https://opencollective.com/svgo","type":"opencollective"},"gitHead":"438059032950dde2c2d36ce45f912085947e60d0","scripts":{"qa":"yarn lint && yarn typecheck && yarn test && yarn test-browser && yarn test-regression","fix":"eslint --ignore-path .gitignore --fix . && prettier --write . --ignore-path .gitignore","lint":"eslint --ignore-path .gitignore . && prettier --check . --ignore-path .gitignore","test":"NODE_OPTIONS=--experimental-vm-modules jest --maxWorkers=4 --coverage","typecheck":"tsc","test-browser":"rollup -c && node ./test/browser.js","prepublishOnly":"rm -rf dist && rollup -c","test-regression":"node ./test/regression-extract.js && NO_DIFF=1 node ./test/regression.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2067e1ae-572b-4be1-ac6b-6afa0337416c"}},"repository":{"url":"git://github.com/svg/svgo.git","type":"git"},"_npmVersion":"11.5.1","description":"Nodejs-based tool for optimizing SVG vector graphics files","directories":{},"resolutions":{"sax@^1.5.0":"patch:sax@npm%3A1.5.0#./.yarn/patches/sax-npm-1.5.0-d40bca2226.patch"},"_nodeVersion":"24.19.0","dependencies":{"sax":"^1.5.0","csso":"^5.0.5","css-tree":"^2.3.1","css-what":"^6.1.0","commander":"^7.2.0","css-select":"^5.1.0","picocolors":"^1.0.0"},"publishConfig":{"tag":"v3"},"_hasShrinkwrap":false,"packageManager":"yarn@2.4.3","readmeFilename":"README.md","devDependencies":{"del":"^6.0.0","jest":"^29.5.5","pngjs":"^7.0.0","eslint":"^8.55.0","rollup":"^2.79.1","prettier":"^3.1.1","@types/sax":"^1.2.7","node-fetch":"^2.7.0","pixelmatch":"^5.3.0","playwright":"^1.40.1","tar-stream":"^3.1.6","typescript":"^5.3.3","@types/csso":"^5.0.4","@types/jest":"^29.5.5","@types/css-tree":"^2.3.4","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^22.0.2","@rollup/plugin-node-resolve":"^14.1.0"},"_npmOperationalInternal":{"tmp":"tmp/svgo_3.3.5_1787569285467_0.7145811820925545","host":"s3://npm-registry-packages-npm-production"},"readme":"<div align=\"center\">\n  <img src=\"./logo/logo-web.svg\" width=\"348.61\" height=\"100\" alt=\"\"/>\n</div>\n\n# SVGO [![npm](https://img.shields.io/npm/v/svgo)](https://npmjs.org/package/svgo) [![chat](https://img.shields.io/discord/815166721315831868)](https://discord.gg/z8jX8NYxrE) [![docs](https://img.shields.io/badge/docs-svgo.dev-blue)](https://svgo.dev/)\n\nSVGO, short for <abbr title=\"Scalable Vector Graphics\">SVG</abbr> Optimizer, is a Node.js library and command-line application for optimizing SVG files.\n\n## Why?\n\nSVG files, especially those exported from vector editors, usually contain a lot of redundant information. This includes editor metadata, comments, hidden elements, default or suboptimal values, and other stuff that can be safely removed or converted without impacting rendering.\n\n## Installation\n\nYou can install SVGO globally through npm, yarn, or pnpm. Alternatively, drop the global flag (`global`/`-g`) to use it in your Node.js project.\n\n```sh\n# npm\nnpm install -g svgo\n\n# yarn\nyarn global add svgo\n\n# pnpm\npnpm add -g svgo\n```\n\n## Command-line usage\n\nProcess single files:\n\n```sh\nsvgo one.svg two.svg -o one.min.svg two.min.svg\n```\n\nProcess a directory of files recursively with `-r`/`--recursive` and `-f`/`--folder`:\n\n```sh\nsvgo -rf path/to/directory_with_svgs -o path/to/output_directory\n```\n\nHelp for advanced usage:\n\n```sh\nsvgo --help\n```\n\n## Configuration\n\nSVGO has a plugin architecture. You can read more about all plugins in [Plugins | SVGO Documentation](https://svgo.dev/docs/plugins/), and the default plugins in [Preset Default | SVGO Documentation](https://svgo.dev/docs/preset-default/).\n\nSVGO reads the configuration from `svgo.config.mjs` or the `--config path/to/config.mjs` command-line option. Some other parameters can be configured though command-line options too.\n\n**`svgo.config.mjs`**\n\n```js\nexport default {\n  multipass: false, // boolean\n  datauri: 'base64', // 'base64'|'enc'|'unenc'\n  js2svg: {\n    indent: 4, // number\n    pretty: false, // boolean\n  },\n  plugins: [\n    'preset-default', // built-in plugins enabled by default\n    'prefixIds', // enable built-in plugins by name\n\n    // enable built-in plugins with an object to configure plugins\n    {\n      name: 'prefixIds',\n      params: {\n        prefix: 'uwu',\n      },\n    },\n  ],\n};\n```\n\n### Default preset\n\nInstead of configuring SVGO from scratch, you can tweak the default preset to suit your needs by configuring or disabling the respective plugin.\n\n**`svgo.config.mjs`**\n\n```js\nexport default {\n  plugins: [\n    {\n      name: 'preset-default',\n      params: {\n        overrides: {\n          // disable a default plugin\n          cleanupIds: false,\n\n          // customize the params of a default plugin\n          inlineStyles: {\n            onlyMatchedOnce: false,\n          },\n        },\n      },\n    },\n  ],\n};\n```\n\nYou can find a list of the default plugins in the order they run in [Preset Default | SVGO Documentation](https://svgo.dev/docs/preset-default/#plugins-list).\n\n### Custom plugins\n\nYou can also specify custom plugins:\n\n**`svgo.config.mjs`**\n\n```js\nimport importedPlugin from './imported-plugin';\n\nexport default {\n  plugins: [\n    // plugin imported from another JavaScript file\n    importedPlugin,\n\n    // plugin defined inline\n    {\n      name: 'customPlugin',\n      params: {\n        paramName: 'paramValue',\n      },\n      fn: (ast, params, info) => {},\n    },\n  ],\n};\n```\n\n## API usage\n\nSVGO provides a few low level utilities.\n\n### optimize\n\nThe core of SVGO is `optimize` function.\n\n```js\nimport { optimize } from 'svgo';\n\nconst result = optimize(svgString, {\n  path: 'path-to.svg', // recommended\n  multipass: true, // all other config fields are available here\n});\n\nconst optimizedSvgString = result.data;\n```\n\n### loadConfig\n\nIf you write a tool on top of SVGO you may want to resolve the `svgo.config.mjs` file.\n\n```js\nimport { loadConfig } from 'svgo';\n\nconst config = await loadConfig();\n```\n\nYou can also specify a path and customize the current working directory.\n\n```js\nconst config = await loadConfig(configFile, cwd);\n```\n\n## Donors\n\n| [<img src=\"https://sheetjs.com/sketch128.png\" width=\"80\">](https://sheetjs.com/) | [<img src=\"https://raw.githubusercontent.com/fontello/fontello/8.0.0/fontello-image.svg\" width=\"80\">](https://fontello.com/) |\n| :------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: |\n|                       [SheetJS LLC](https://sheetjs.com/)                        |                                              [Fontello](https://fontello.com/)                                               |\n\n## License and Copyright\n\nThis software is released under the terms of the [MIT license](https://github.com/svg/svgo/blob/main/LICENSE).\n\nLogo by [André Castillo](https://github.com/DerianAndre).\n","publish_time":1787569285550,"_cnpm_publish_time":1787569285550,"dist-tags":{"latest":"4.1.0","rc":"4.0.0-rc.5","v2":"2.8.4","v3":"3.3.5"}}