{"name":"svgo","version":"2.8.1","keywords":["svgo","svg","optimize","minify"],"author":{"url":"https://github.com/deepsweet","name":"Kir Belevich","email":"kir@belevi.ch"},"license":"MIT","_id":"svgo@2.8.1","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"}],"homepage":"https://github.com/svg/svgo","bugs":{"url":"https://github.com/svg/svgo/issues"},"bin":"./bin/svgo","dist":{"shasum":"44baf6865caaa7eef4087fa2e08c50f6c088c346","tarball":"http://registry-npm.ywwl.com/svgo/download/svgo-2.8.1.tgz","fileCount":85,"integrity":"sha512-BYibJ2/mV0Xv9c49ludbc/oN1MJwJZxikJNi7iLrOMJZpsVhch56/V6oCW8wcRqeBaNLE60C6biLE1GMw43bag==","signatures":[{"sig":"MEQCIBKZkFQLVRzQ5P3Lv5jpUmQ3c4t7G39H/M2/8F/ZkeWUAiB7nLvgsE5zjsWsaAS8uHkKKkiZYowOveMLzD9SCLoAPg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1011954,"size":248951,"noattachment":false,"key":"/svgo/-/svgo-2.8.1.tgz"},"jest":{"coveragePathIgnorePatterns":["fixtures"]},"main":"./lib/svgo-node.js","engines":{"node":">=10.13.0"},"scripts":{"fix":"eslint --ignore-path .gitignore --fix . && prettier --write \"**/*.js\" --ignore-path .gitignore","lint":"eslint --ignore-path .gitignore . && prettier --check \"**/*.js\" --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"},"prettier":{"singleQuote":true},"deprecated":"included some *.test.js files by mistake, the test files were omitted in v2.8.2","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":"^4.2.0","stable":"^0.1.8","css-tree":"^1.1.3","commander":"^7.2.0","css-select":"^4.1.3","picocolors":"^1.0.0"},"eslintConfig":{"env":{"node":true,"es2021":true},"extends":["eslint:recommended"],"overrides":[{"files":["rollup.config.js"],"parserOptions":{"sourceType":"module"}},{"env":{"jest":true},"files":["**/*.test.js"]}],"parserOptions":{"ecmaVersion":"2021"}},"_hasShrinkwrap":false,"packageManager":"yarn@2.4.3","devDependencies":{"del":"^6.0.0","jest":"^27.2.5","pngjs":"^6.0.0","eslint":"^7.32.0","rollup":"^2.56.3","prettier":"^2.4.0","@types/sax":"^1.2.7","node-fetch":"^2.6.2","pixelmatch":"^5.2.1","playwright":"^1.14.1","tar-stream":"^2.2.0","typescript":"^4.4.3","@types/csso":"^4.2.0","@types/jest":"^27.0.1","@types/css-tree":"^1.0.6","@rollup/plugin-json":"^4.1.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4"},"_npmOperationalInternal":{"tmp":"tmp/svgo_2.8.1_1772635987964_0.16746904318608014","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":1772635988141,"_cnpm_publish_time":1772635988141,"dist-tags":{"latest":"4.1.0","rc":"4.0.0-rc.5","v2":"2.8.4","v3":"3.3.5"}}