-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
71 lines (71 loc) · 8.07 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"name": "svgo",
"version": "0.3.7",
"description": "Nodejs-based tool for optimizing SVG vector graphics files",
"keywords": [
"svgo",
"svg",
"optimize",
"minify"
],
"homepage": "http://svg.github.com/svgo/",
"bugs": {
"url": "https://github.com/svg/svgo/issues",
"email": "kir@soulshine.in"
},
"author": {
"name": "Kir Belevich",
"email": "kir@soulshine.in",
"url": "https://github.com/deepsweet"
},
"contributors": [
{
"name": "Sergey Belov",
"email": "peimei@ya.ru",
"url": "http://github.com/arikon"
}
],
"repository": {
"type": "git",
"url": "git://github.com/svg/svgo.git"
},
"main": "./lib/svgo.js",
"bin": {
"svgo": "./bin/svgo"
},
"directories": {
"bin": "./bin",
"lib": "./lib",
"example": "./examples"
},
"scripts": {
"test": "make test"
},
"dependencies": {
"sax": "~0.5.0",
"coa": "~0.3.7",
"js-yaml": "",
"colors": "~0.6.0",
"whet.extend": ""
},
"devDependencies": {
"mocha": "~1.9.0",
"should": "~1.2.0",
"istanbul": "~0.1.0",
"mocha-istanbul": "",
"coveralls": ""
},
"engines": {
"node": ">=0.6.0"
},
"licenses": [
{
"type": "MIT",
"url": "https://raw.github.com/svg/svgo/master/LICENSE"
}
],
"readme": "**english** | [русский](https://github.com/svg/svgo/blob/master/README.ru.md)\n- - -\n\n<img src=\"http://soulshine.in/svgo.svg\" width=\"200\" height=\"200\" alt=\"logo\"/>\n\n## SVGO [![NPM version](https://badge.fury.io/js/svgo.png)](https://npmjs.org/package/svgo) [![Dependency Status](https://gemnasium.com/svg/svgo.png)](https://gemnasium.com/svg/svgo) [![Build Status](https://secure.travis-ci.org/svg/svgo.png)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://coveralls.io/repos/svg/svgo/badge.png?branch=master)](https://coveralls.io/r/svg/svgo)\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 exported from various editors, usually contains a lot of redundant and useless information such as editor metadata, comments, hidden elements, default or non-optimal values and other stuff that can be safely removed or converted without affecting 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* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupAttrs.js) ] cleanup attributes from newlines, trailing and repeating spaces\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeDoctype.js) ] remove doctype declaration\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeXMLProcInst.js) ] remove XML processing instructions\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeComments.js) ] remove comments\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeMetadata.js) ] remove `<metadata>`\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeEditorsNSData.js) ] remove editors namespaces, elements and attributes\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeEmptyAttrs.js) ] remove empty attributes\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeHiddenElems.js) ] remove hidden elements\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeEmptyText.js) ] remove empty Text elements\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeEmptyContainers.js) ] remove empty Container elements\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeViewBox.js) ] remove `viewBox` attribute when possible\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupEnableBackground.js) ] remove or cleanup `enable-background` attribute when possible\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/convertStyleToAttrs.js) ] convert styles into attributes\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/convertColors.js) ] convert colors (from `rgb()` to `#rrggbb`, from `#rrggbb` to `#rgb`)\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/convertPathData.js) ] convert Path data to relative, convert one segment to another, trim useless delimiters and much more\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/convertTransform.js) ] collapse multiple transforms into one, convert matrices to the short aliases and much more\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUnknownsAndDefaults.js) ] remove unknown elements content and attributes, remove attrs with default values\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeNonInheritableGroupAttrs.js) ] remove non-inheritable group's \"presentation\" attributes\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUnusedNS.js) ] remove unused namespaces declaration\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupIDs.js) ] remove unused and minify used IDs\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupNumericValues.js) ] round numeric values to the fixed precision, remove default 'px' units\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/moveElemsAttrsToGroup.js) ] move elements attributes to the existing group wrapper\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/moveGroupAttrsToElems.js) ] move some group attributes to the content elements\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/collapseGroups.js) ] collapse useless groups\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeRasterImages.js) ] remove raster images (disabled by default)\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/mergePaths.js) ] merge multiple Paths into one\n* [ [>](https://github.com/svg/svgo/blob/master/plugins/transformsWithOnePath.js) ] apply transforms, crop by real width, center vertical alignment and resize SVG with one Path inside\n\nWant to know how it works and how to write your own plugin? [Of course you want to](https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md).\n\n\n## How to use\n\n```sh\n$ [sudo] npm install -g svgo\n```\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 (by default the same as the input), \"-\" for STDOUT\n --config=CONFIG : Config file to extend or replace default\n --disable=DISABLE : Disable plugin by name\n --enable=ENABLE : Enable plugin by name\n --datauri=DATAURI : Output as Data URI string (base64, URI encoded or unencoded)\n --pretty : Make SVG pretty printed\n\nArguments:\n INPUT : Alias to --input\n OUTPUT : Alias to --output\n```\n\n* with files:\n\n $ svgo test.svg\n\n or:\n\n $ svgo test.svg test.min.svg\n\n* with STDIN / STDOUT:\n\n $ cat test.svg | svgo -i - -o - > test.min.svg\n\n* with folder\n\n $ svgo -f ../path/to/folder/with/svg/files\n\n* with strings:\n\n $ svgo -s '<svg version=\"1.1\">test</svg>' -o test.min.svg\n\n or even with Data URI base64:\n\n $ svgo -s 'data:image/svg+xml;base64,…' -o test.min.svg\n\n* with SVGZ:\n\n from `.svgz` to `.svg`:\n\n $ gunzip -c test.svgz | svgo -i - -o test.min.svg\n\n from `.svg` to `.svgz`:\n\n $ svgo test.svg -o - | gzip -cfq9 > test.svgz\n\n* with GUI – [svgo-gui](https://github.com/svg/svgo-gui)\n* as a Nodejs module – [examples](https://github.com/svg/svgo/tree/master/examples)\n* as a Grunt task – [grunt-svgmin](https://github.com/sindresorhus/grunt-svgmin)\n* as an OSX Folder Action – [svgo-osx-folder-action](https://github.com/svg/svgo-osx-folder-action)\n\n## TODO\n\n* [v0.3.x](https://github.com/svg/svgo/issues?milestone=7&state=open)\n\n\n## License and copyrights\n\nThis software is released under the terms of the [MIT license](https://github.com/svg/svgo/blob/master/LICENSE).\n\nLogo by [Yegor Bolshakov](http://xizzzy.ru/).\n",
"readmeFilename": "README.md",
"_id": "svgo@0.3.7",
"_from": "svgo@~0.3.1"
}