{"_id":"@applaud/svgo","name":"@applaud/svgo","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@applaud/svgo","version":"1.0.0","description":"Nodejs-based tool for optimizing SVG vector graphics files","keywords":["svgo","svg","optimize","minify","applaud"],"homepage":"https://github.com/Applaud-devpack/svgo","bugs":{"url":"https://github.com/Applaud-devpack/svgo/issues"},"author":{"name":"Applaud"},"repository":{"type":"git","url":"git+https://github.com/Applaud-devpack/svgo.git"},"main":"./lib/svgo.js","bin":{"svgo":"./bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"jshint --show-non-errors .","jshint":"npm run lint"},"dependencies":{"@applaud/css-select":"^1.0.0","chalk":"^2.4.1","coa":"^2.0.2","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","object.values":"^1.1.0","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","fs-extra":"~8.1.0","istanbul":"~0.4.5","jshint":"~2.10.2","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"24c1fbdef060bb872d6445b45e3bfc014554409b","_id":"@applaud/svgo@1.0.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"mahesh_reddy","email":"applaud.devpack@gmail.com"},"dist":{"integrity":"sha512-Y0omx/u+jKGvitDR2XIYsPoqmiYCKMzAWjrgpNuc6AiG9mCTffXEt1OjwZ/2xtZUukHdMQbvkx3SyVX50cUmJw==","shasum":"05386bddf389ef4fc485a6750c66383c9e68434e","tarball":"https://registry.npmjs.org/@applaud/svgo/-/svgo-1.0.0.tgz","fileCount":71,"unpackedSize":389154,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGpTUJU2/lnxcSsRLcVX+my6OSYfpmPLA/A4iccX5n2AiA1CUNmacwSYIcZKo/irA+p+mAVZOggOJgVkWdzVQa0DA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUjXIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqL2w//S4RQczqPqStJupGim2waqK9ZaILRNUX42A+I9tB+f5NcX4py\r\n1DnLZqg3QMUQcjMUjn0CZ4uZmTDDPxht+e2P0Rj6JikmmCTfqhgwpAzkWnhe\r\nAkZ0s1rWULAIrZxGPRQN6Ij/FkHGd61Euga5KIcAVU8r2NvRARFiTXQrlfSJ\r\nozno9V/e3rcUtlGWC5Jvm6E5yj2UdZ2rK0dXQOd5mN2Di50mpO1bvoBKn8ef\r\nNEmDwejRu4uOd0vCNreTYLsmisPg297D+6uwYphIw9qbsIJGZhT0nwdk8+Fz\r\nRh4v6Q9EizSbNvDyunlYnPd2zx5Em28zCnhL1GMAgKxESd3ChEQX5QACmRCY\r\n2MJff9TK7omJ/W/fCCHgybICBewdl48PeTt0GnPjdwJu6xxaPqtQflQ9XUZ1\r\nVb8d6y08kFdqJegpxHD8YpNyEZeScNOK8ZaDvqkK9KWPSx92CON6zpUvrvnP\r\n5vwGCTRNjgQwKl0C1gEjf1w0/mhBegEmIs+n+Kn8/iXXdaTrLudV/T6MtnbG\r\nimUM0NnoKd+7AmLlckaztlPEgIRbLOPvSIlL2aFwVRz/cinAIdjhuZQU9pFy\r\nqw7S77FlZFjSVpGiHM3Q0bZafAqwhJjhjIwRwxY63MZuh56LUWLG6LKxzNO4\r\nYDCD3fFAMLJubkKRowaiGQe5tb1Fv8Fn+ok=\r\n=7AR1\r\n-----END PGP SIGNATURE-----\r\n"},"maintainers":[{"name":"mahesh_reddy","email":"applaud.devpack@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo_1.0.0_1666332104148_0.019849079315494844"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-21T06:01:44.085Z","1.0.0":"2022-10-21T06:01:44.313Z","modified":"2022-10-21T06:01:44.493Z"},"maintainers":[{"name":"mahesh_reddy","email":"applaud.devpack@gmail.com"}],"description":"Nodejs-based tool for optimizing SVG vector graphics files","homepage":"https://github.com/Applaud-devpack/svgo","keywords":["svgo","svg","optimize","minify","applaud"],"repository":{"type":"git","url":"git+https://github.com/Applaud-devpack/svgo.git"},"author":{"name":"Applaud"},"bugs":{"url":"https://github.com/Applaud-devpack/svgo/issues"},"license":"MIT","readme":"\n\n<img src=\"https://svg.github.io/svgo-logo.svg\" width=\"200\" height=\"200\" alt=\"logo\"/>\n\n## @applaud/SVGO [![NPM version](https://badge.fury.io/js/svgo.svg)](https://npmjs.org/package/svgo) [![Build Status](https://secure.travis-ci.org/svg/svgo.svg)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://img.shields.io/coveralls/svg/svgo.svg)](https://coveralls.io/r/svg/svgo?branch=master)\n\n**SVG O**ptimizer is a Nodejs-based tool for optimizing SVG vector graphics files.\n![](https://mc.yandex.ru/watch/18431326)\n\n## Why?\n\nSVG files, especially those exported from various editors, usually contain a lot of redundant and useless information. This can include editor metadata, comments, hidden elements, default or non-optimal values and other stuff that can be safely removed or converted without affecting the SVG rendering result.\n\n## What it can do\n\nSVGO has a plugin-based architecture, so almost every optimization is a separate plugin.\n\nToday we have:\n\n| Plugin | Description | Default |\n| ------ | ----------- | ------- |\n| [cleanupAttrs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/cleanupAttrs.js) | cleanup attributes from newlines, trailing, and repeating spaces | `enabled` |\n| [inlineStyles](https://github.com/Applaud-devpack/svgo/blob/master/plugins/inlineStyles.js) | move and merge styles from `<style>` elements to element `style` attributes | `enabled` |\n| [removeDoctype](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeDoctype.js) | remove doctype declaration | `enabled` |\n| [removeXMLProcInst](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeXMLProcInst.js) | remove XML processing instructions | `enabled` |\n| [removeComments](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeComments.js) | remove comments | `enabled` |\n| [removeMetadata](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeMetadata.js) | remove `<metadata>` | `enabled` |\n| [removeTitle](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeTitle.js) | remove `<title>` | `enabled` |\n| [removeDesc](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeDesc.js) | remove `<desc>` | `enabled` |\n| [removeUselessDefs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeUselessDefs.js) | remove elements of `<defs>` without `id` | `enabled` |\n| [removeXMLNS](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeXMLNS.js) | removes `xmlns` attribute (for inline svg) | `disabled` |\n| [removeEditorsNSData](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeEditorsNSData.js) | remove editors namespaces, elements, and attributes | `enabled` |\n| [removeEmptyAttrs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeEmptyAttrs.js) | remove empty attributes | `enabled` |\n| [removeHiddenElems](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeHiddenElems.js) | remove hidden elements | `enabled` |\n| [removeEmptyText](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeEmptyText.js) | remove empty Text elements | `enabled` |\n| [removeEmptyContainers](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeEmptyContainers.js) | remove empty Container elements | `enabled` |\n| [removeViewBox](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeViewBox.js) | remove `viewBox` attribute when possible | `enabled` |\n| [cleanupEnableBackground](https://github.com/Applaud-devpack/svgo/blob/master/plugins/cleanupEnableBackground.js) | remove or cleanup `enable-background` attribute when possible | `enabled` |\n| [minifyStyles](https://github.com/Applaud-devpack/svgo/blob/master/plugins/minifyStyles.js) | minify `<style>` elements content with [CSSO](https://github.com/css/csso) | `enabled` |\n| [convertStyleToAttrs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/convertStyleToAttrs.js) | convert styles into attributes | `enabled` |\n| [convertColors](https://github.com/Applaud-devpack/svgo/blob/master/plugins/convertColors.js) | convert colors (from `rgb()` to `#rrggbb`, from `#rrggbb` to `#rgb`) | `enabled` |\n| [convertPathData](https://github.com/Applaud-devpack/svgo/blob/master/plugins/convertPathData.js) | convert Path data to relative or absolute (whichever is shorter), convert one segment to another, trim useless delimiters, smart rounding, and much more | `enabled` |\n| [convertTransform](https://github.com/Applaud-devpack/svgo/blob/master/plugins/convertTransform.js) | collapse multiple transforms into one, convert matrices to the short aliases, and much more | `enabled` |\n| [removeUnknownsAndDefaults](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeUnknownsAndDefaults.js) | remove unknown elements content and attributes, remove attrs with default values | `enabled` |\n| [removeNonInheritableGroupAttrs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeNonInheritableGroupAttrs.js) | remove non-inheritable group's \"presentation\" attributes | `enabled` |\n| [removeUselessStrokeAndFill](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeUselessStrokeAndFill.js) | remove useless `stroke` and `fill` attrs | `enabled` |\n| [removeUnusedNS](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeUnusedNS.js) | remove unused namespaces declaration | `enabled` |\n| [prefixIds](https://github.com/Applaud-devpack/svgo/blob/master/plugins/prefixIds.js) | prefix IDs and classes with the SVG filename or an arbitrary string | `disabled` |\n| [cleanupIDs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/cleanupIDs.js) | remove unused and minify used IDs | `enabled` |\n| [cleanupNumericValues](https://github.com/Applaud-devpack/svgo/blob/master/plugins/cleanupNumericValues.js) | round numeric values to the fixed precision, remove default `px` units | `enabled` |\n| [cleanupListOfValues](https://github.com/Applaud-devpack/svgo/blob/master/plugins/cleanupListOfValues.js) | round numeric values in attributes that take a list of numbers (like `viewBox` or `enable-background`) | `disabled` |\n| [moveElemsAttrsToGroup](https://github.com/Applaud-devpack/svgo/blob/master/plugins/moveElemsAttrsToGroup.js) | move elements' attributes to their enclosing group | `enabled` |\n| [moveGroupAttrsToElems](https://github.com/Applaud-devpack/svgo/blob/master/plugins/moveGroupAttrsToElems.js) | move some group attributes to the contained elements | `enabled` |\n| [collapseGroups](https://github.com/Applaud-devpack/svgo/blob/master/plugins/collapseGroups.js) | collapse useless groups | `enabled` |\n| [removeRasterImages](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeRasterImages.js) | remove raster images | `disabled` |\n| [mergePaths](https://github.com/Applaud-devpack/svgo/blob/master/plugins/mergePaths.js) | merge multiple Paths into one | `enabled` |\n| [convertShapeToPath](https://github.com/Applaud-devpack/svgo/blob/master/plugins/convertShapeToPath.js) | convert some basic shapes to `<path>` | `enabled` |\n| [convertEllipseToCircle](https://github.com/Applaud-devpack/svgo/blob/master/plugins/convertEllipseToCircle.js) | convert non-eccentric `<ellipse>` to `<circle>` | `enabled` |\n| [sortAttrs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/sortAttrs.js) | sort element attributes for epic readability | `disabled` |\n| [sortDefsChildren](https://github.com/Applaud-devpack/svgo/blob/master/plugins/sortDefsChildren.js) | sort children of `<defs>` in order to improve compression | `enabled` |\n| [removeDimensions](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeDimensions.js) | remove `width`/`height` and add `viewBox` if it's missing (opposite to removeViewBox, disable it first) | `disabled` |\n| [removeAttrs](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeAttrs.js) | remove attributes by pattern | `disabled` |\n| [removeAttributesBySelector](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeAttributesBySelector.js) | removes attributes of elements that match a css selector | `disabled` |\n| [removeElementsByAttr](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeElementsByAttr.js) | remove arbitrary elements by ID or className | `disabled` |\n| [addClassesToSVGElement](https://github.com/Applaud-devpack/svgo/blob/master/plugins/addClassesToSVGElement.js) | add classnames to an outer `<svg>` element | `disabled` |\n| [addAttributesToSVGElement](https://github.com/Applaud-devpack/svgo/blob/master/plugins/addAttributesToSVGElement.js) | adds attributes to an outer `<svg>` element | `disabled` |\n| [removeOffCanvasPaths](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeOffCanvasPaths.js) | removes elements that are drawn outside of the viewbox | `disabled` |\n| [removeStyleElement](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeStyleElement.js) | remove `<style>` elements | `disabled` |\n| [removeScriptElement](https://github.com/Applaud-devpack/svgo/blob/master/plugins/removeScriptElement.js) | remove `<script>` elements | `disabled` |\n| [reusePaths](https://github.com/Applaud-devpack/svgo/blob/master/plugins/reusePaths.js) | Find duplicated <path> elements and replace them with <use> links | `disabled` |\n\nWant to know how it works and how to write your own plugin? [Of course you want to](https://github.com/Applaud-devpack/svgo/blob/master/docs/how-it-works/en.md).\n\n\n## Installation\n\n```sh\n$ npm install @applaud/svgo\n```\n\n## Usage\n\n### <abbr title=\"Command Line Interface\">CLI</abbr>\n\n```\nUsage:\n  svgo [OPTIONS] [ARGS]\n\nOptions:\n  -h, --help : Help\n  -v, --version : Version\n  -i INPUT, --input=INPUT : Input file, \"-\" for STDIN\n  -s STRING, --string=STRING : Input SVG data string\n  -f FOLDER, --folder=FOLDER : Input folder, optimize and rewrite all *.svg files\n  -o OUTPUT, --output=OUTPUT : Output file or folder (by default the same as the input), \"-\" for STDOUT\n  -p PRECISION, --precision=PRECISION : Set number of digits in the fractional part, overrides plugins params\n  --config=CONFIG : Config file or JSON string to extend or replace default\n  --disable=PLUGIN : Disable plugin by name, \"--disable=PLUGIN1,PLUGIN2\" for multiple plugins\n  --enable=PLUGIN : Enable plugin by name, \"--enable=PLUGIN3,PLUGIN4\" for multiple plugins\n  --datauri=DATAURI : Output as Data URI string (base64, URI encoded or unencoded)\n  --multipass : Pass over SVGs multiple times to ensure all optimizations are applied\n  --pretty : Make SVG pretty printed\n  --indent=INDENT : Indent number when pretty printing SVGs\n  -r, --recursive : Use with '-f'. Optimizes *.svg files in folders recursively.\n  -q, --quiet : Only output error messages, not regular status messages\n  --show-plugins : Show available plugins and exit\n\nArguments:\n  INPUT : Alias to --input\n```\n\n* with files:\n\n    ```sh\n    $ svgo test.svg\n    ```\n\n    or:\n\n    ```sh\n    $ svgo *.svg\n    ```\n\n    ```sh\n    $ svgo test.svg -o test.min.svg\n    ```\n\n    ```sh\n    $ svgo test.svg other.svg third.svg\n    ```\n\n    ```sh\n    $ svgo test.svg other.svg third.svg -o test.min.svg -o other.min.svg -o third.min.svg\n    ```\n\n* with STDIN / STDOUT:\n\n    ```sh\n    $ cat test.svg | svgo -i - -o - > test.min.svg\n    ```\n\n* with folder\n\n    ```sh\n    $ svgo -f ../path/to/folder/with/svg/files\n    ```\n\n    or:\n\n    ```sh\n    $ svgo -f ../path/to/folder/with/svg/files -o ../path/to/folder/with/svg/output\n    ```\n\n    ```sh\n    $ svgo *.svg -o ../path/to/folder/with/svg/output\n    ```\n\n* with strings:\n\n    ```sh\n    $ svgo -s '<svg version=\"1.1\">test</svg>' -o test.min.svg\n    ```\n\n    or even with Data URI base64:\n\n    ```sh\n    $ svgo -s 'data:image/svg+xml;base64,...' -o test.min.svg\n    ```\n\n* with SVGZ:\n\n    from `.svgz` to `.svg`:\n\n    ```sh\n    $ gunzip -c test.svgz | svgo -i - -o test.min.svg\n    ```\n\n    from `.svg` to `.svgz`:\n\n    ```sh\n    $ svgo test.svg -o - | gzip -cfq9 > test.svgz\n    ```\n\n### Other Ways to Use SVGO\n\n* as a web app – [SVGOMG](https://jakearchibald.github.io/svgomg/)\n* as a Nodejs module – [examples](https://github.com/Applaud-devpack/svgo/tree/master/examples)\n* as a Grunt task – [grunt-svgmin](https://github.com/sindresorhus/grunt-svgmin)\n* as a Gulp task – [gulp-svgmin](https://github.com/ben-eb/gulp-svgmin)\n* as a Mimosa module – [mimosa-minify-svg](https://github.com/dbashford/mimosa-minify-svg)\n* as an OSX Folder Action – [svgo-osx-folder-action](https://github.com/svg/svgo-osx-folder-action)\n* as a webpack loader – [image-webpack-loader](https://github.com/tcoopman/image-webpack-loader)\n* as a Telegram Bot – [svgo_bot](https://github.com/maksugr/svgo_bot)\n* as a PostCSS plugin – [postcss-svgo](https://github.com/ben-eb/postcss-svgo)\n* as an Inkscape plugin – [inkscape-svgo](https://github.com/konsumer/inkscape-svgo)\n* as a Sketch plugin - [svgo-compressor](https://github.com/BohemianCoding/svgo-compressor)\n* as macOS app - [Image Shrinker](https://image-shrinker.com)\n* as a Rollup plugin - [rollup-plugin-svgo](https://github.com/porsager/rollup-plugin-svgo)\n\n## License and Copyright\n\nThis software is released under the terms of the [MIT license](https://github.com/Applaud-devpack/svgo/blob/master/LICENSE).\n\n\n\n\n<h2 align=\"center\">Maintainers</h2>\n\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\">\n        <a href=\"https://github.com/Applaud-devpack\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/Applaud-devpack.png?v=3&s=150\">\n          </br>\n          Applaud Dev team\n        </a>\n      </td>\n    </tr>\n  <tbody>\n</table>\n","readmeFilename":"README.md"}