{"name":"svgo","version":"3.3.3","keywords":["svgo","svg","optimize","minify"],"author":{"url":"https://github.com/deepsweet","name":"Kir Belevich","email":"kir@belevi.ch"},"license":"MIT","_id":"svgo@3.3.3","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":"./bin/svgo","dist":{"shasum":"8246aee0b08791fde3b0ed22b5661b471fadf58e","tarball":"http://registry-npm.ywwl.com/svgo/download/svgo-3.3.3.tgz","fileCount":78,"integrity":"sha512-+wn7I4p7YgJhHs38k2TNjy1vCfPIfLIJWR5MnCStsN8WuuTcBnRKcMHQLMM2ijxGZmDoZwNv8ipl5aTTen62ng==","signatures":[{"sig":"MEUCIHObIsJuCWFNuTxns+P9g+tNdxItw0dYU8kq5IfUbOzFAiEAmM6x+Ft0v7VdWDb5sLV3s0hJqSsVyS7cQcw98VAxplw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1302553,"size":320745,"noattachment":false,"key":"/svgo/-/svgo-3.3.3.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":"bbab162534d89654ac51c30dd6e62d7163b48a5e","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":"sethiii","email":"seth@falco.fun"},"repository":{"url":"git://github.com/svg/svgo.git","type":"git"},"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"},"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"},"_hasShrinkwrap":false,"packageManager":"yarn@2.4.3","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.3_1772635554253_0.11237478188662409","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":1772635554429,"_cnpm_publish_time":1772635554429,"dist-tags":{"latest":"4.1.0","rc":"4.0.0-rc.5","v2":"2.8.4","v3":"3.3.5"}}