{"_id":"svg2sprite","_rev":"8-36d9433939d07476cebf08f8f3ed77c8","name":"svg2sprite","description":"A very simple module to generate SVG sprites","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"svg2sprite","version":"1.0.0","description":"A very simple module to generate SVG sprites.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/mrmlnc/svg2sprite.git"},"author":{"name":"Denis Malinochkin","url":"canonium.com"},"engines":{"node":">=4.0.0"},"scripts":{"pretest":"rimraf out && tslint src/**/*.ts && tsc","test":"mocha --recursive out","prepublish":"npm run test","start":"rimraf out && tsc --watch"},"main":"out/sprite.js","typings":"out/sprite.d.ts","files":["out/sprite.js","out/sprite.d.ts","out/lib/attributes.js","out/lib/clean.js"],"keywords":["svg","symbol","sprite","spritesheet","generator","icon","icons"],"dependencies":{},"devDependencies":{"mocha":"^3.0.0","rimraf":"^2.5.0","tslint":"^3.14.0","typescript":"^1.8.0"},"bugs":{"url":"https://github.com/mrmlnc/svg2sprite/issues"},"homepage":"https://github.com/mrmlnc/svg2sprite#readme","_id":"svg2sprite@1.0.0","_shasum":"72b1bab91e30cd29e24bacbba171caba689a6a9d","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"},"dist":{"shasum":"72b1bab91e30cd29e24bacbba171caba689a6a9d","tarball":"https://registry.npmjs.org/svg2sprite/-/svg2sprite-1.0.0.tgz","integrity":"sha512-aYFkmrLAH2xTL5jdpsojMp78pTuqF/L5ZbtXrED8frMm/V6Ny1BXdkZGu9jGbghtmXPyWgJYx6qVrDfy6HMB+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaxdGxKtuiW6IJrQp7LC+EpvYzxW2DafET4VtcJACOagIhAP5w4JE64ZQKsSWU5U3mo/ex2ohK5G7oNRPkLmaLuRK3"}]},"maintainers":[{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/svg2sprite-1.0.0.tgz_1471264647869_0.4355457725469023"}},"2.0.0":{"name":"svg2sprite","version":"2.0.0","description":"A very simple module to generate SVG sprites","license":"MIT","repository":{"type":"git","url":"git+https://github.com/mrmlnc/svg2sprite.git"},"author":{"name":"Denis Malinochkin","url":"canonium.com"},"engines":{"node":">=4.0.0"},"main":"out/sprite.js","typings":"out/sprite.d.ts","files":["out/sprite.js","out/sprite.d.ts","out/lib"],"keywords":["svg","symbol","sprite","spritesheet","generator","icon","icons"],"dependencies":{"svg-parser":"^1.0.5"},"devDependencies":{"mocha":"^3.1.2","rimraf":"^2.5.4","tslint":"^3.15.1","typescript":"^2.0.8"},"scripts":{"clean":"rimraf out","lint":"tslint src/**/*.ts","compile":"tsc","test":"mocha out/**/*.spec.js","build":"npm run clean && npm run lint && npm run compile && npm test","watch":"npm run clean && npm run lint && npm run compile -- --watch"},"bugs":{"url":"https://github.com/mrmlnc/svg2sprite/issues"},"homepage":"https://github.com/mrmlnc/svg2sprite#readme","_id":"svg2sprite@2.0.0","_shasum":"1ced328c8042977db14af1bcab620532374a1cc2","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"},"dist":{"shasum":"1ced328c8042977db14af1bcab620532374a1cc2","tarball":"https://registry.npmjs.org/svg2sprite/-/svg2sprite-2.0.0.tgz","integrity":"sha512-cemoSd+lbCRT41vzVGewW2qFW9VQZMptNNIPmHYGDI4bHmposOGWhkjgQc37+soCuBFRZ2Mu0cBdluVWSR2E9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAT4AoUHMaeVVxVgRZSYjRWnmQX3dZCbEs9p/QFLd+WgAiEAnFPqGF5wNrK/LXVjEhBmoqEOoSW0H+NEB0E1AtZYgDo="}]},"maintainers":[{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/svg2sprite-2.0.0.tgz_1479924475126_0.6316202466841787"}},"2.0.1":{"name":"svg2sprite","version":"2.0.1","description":"A very simple module to generate SVG sprites","license":"MIT","repository":{"type":"git","url":"git+https://github.com/mrmlnc/svg2sprite.git"},"author":{"name":"Denis Malinochkin","url":"canonium.com"},"engines":{"node":">=4.0.0"},"main":"out/sprite.js","typings":"out/sprite.d.ts","files":["out/sprite.js","out/sprite.d.ts","out/lib"],"keywords":["svg","symbol","sprite","spritesheet","generator","icon","icons"],"dependencies":{"svg-parser":"^1.0.5"},"devDependencies":{"mocha":"^3.1.2","rimraf":"^2.5.4","tslint":"^3.15.1","typescript":"^2.0.8"},"scripts":{"clean":"rimraf out","lint":"tslint src/**/*.ts","compile":"tsc","test":"mocha out/**/*.spec.js","build":"npm run clean && npm run lint && npm run compile && npm test","watch":"npm run clean && npm run lint && npm run compile -- --sourceMap --watch"},"gitHead":"0bc348e9fcb9a2f1820a80f644fc8fc83055c578","bugs":{"url":"https://github.com/mrmlnc/svg2sprite/issues"},"homepage":"https://github.com/mrmlnc/svg2sprite#readme","_id":"svg2sprite@2.0.1","_shasum":"d2347d600d97a69cf2e93e57ee55c45306a70ae7","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"},"dist":{"shasum":"d2347d600d97a69cf2e93e57ee55c45306a70ae7","tarball":"https://registry.npmjs.org/svg2sprite/-/svg2sprite-2.0.1.tgz","integrity":"sha512-chrxjl+nE7d9Gb55uVez6O+Uhcldn7MZ/ePcjtiPp4RPQqaoY2h3mbmWD+5kXummmmd2F2YUAgOGOWGIBGDscQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5MxUrr6cfnZRHUL5v5u3OjYCZ1UeQLGui4ghhpXe/DAIhAMvd+87UUc+TD8IK1tOfJsg6Yfd5koQRs6WubEgUEg4T"}]},"maintainers":[{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/svg2sprite-2.0.1.tgz_1479931282866_0.9256898397579789"}}},"readme":"# svg2sprite\n\n> A very simple module to generate SVG sprites.\n\n[![Travis Status](https://travis-ci.org/mrmlnc/svg2sprite.svg?branch=master)](https://travis-ci.org/mrmlnc/svg2sprite)\n\n## Install\n\n```shell\n$ npm i -D svg2sprite\n```\n\n## Why?\n\nExisting solutions have many dependencies.\n\n## Usage\n\n```js\nconst svgSprite = require('svg2sprite');\nconst sprite = svgSprite.collection({ inline: true });\n\nsprite.add('chevron-up', '<svg><path d=\"M10 10l-1.5 1.5L5 7.75 1.5 11.5 0 10l5-5z\"></path></svg>');\nsprite.add('chevron-down', '<svg><path d=\"M5 11L0 6l1.5-1.5L5 8.25 8.5 4.5 10 6z\"></path></svg>');\n\nconst svg = sprite.compile();\n\nconsole.log(svg);\n// <svg position=\"absolute\" height=\"0\" width=\"0\">\n//   <symbol id=\"chevron-up\"><path d=\"M10 10l-1.5 1.5L5 7.75 1.5 11.5 0 10l5-5z\"></path></symbol>\n//   <symbol id=\"chevron-down\"><path d=\"M5 11L0 6l1.5-1.5L5 8.25 8.5 4.5 10 6z\"></path></symbol>\n// </svg>\n```\n\n## Supported methods\n\n#### `.collection([options])`\n\nThis method creates a new item collection and returns the available methods for it. See all available [options](#supported-options).\n\n#### `.add(name, content, options)`\n\nThis method adds an item to the collection. Using the last argument you can transfer individual settings for that item (e.g. `attributes`). See all available [options](#supported-options).\n\n#### `.get(name)`\n\nReturns the contents of a specified element.\n\n#### `.remove(name)`\n\nRemoves the specified item from the collection.\n\n#### `.clean()`\n\nRemoves all elements in the collection.\n\n#### `.compile()`\n\nReturns the builded sprite.\n\n## Supported options\n\n#### rootAttributes\n\n  * Type: `Object`\n  * Default: `{}`\n\nThe attributes that will be added to the root `svg` tag.\n\n#### inline\n\n  * Type: `Boolean`\n  * Default: `false`\n\nIf you want to embed the sprite into your HTML source, you will want to set this to `true` in order to prevent the creation of SVG namespace declarations and to set some other attributes for effectively hiding the library sprite.\n\n#### iconAttributes\n\n  * Type: `Object`\n  * Default: `{}`\n\nThe attributes of each icon. Current attribute values will be overwritten.\n\n#### iconPrefix\n\n  * Type: `String`\n  * Default: `''`\n\nThe name prefix for each icon.\n\n#### iconSuffix\n\n  * Type: `String`\n  * Default: `''`\n\nThe name suffix for each icon.\n\n#### clean.stripEmptyTags\n\n  * Type: `Boolean`\n  * Default: `true`\n\nRemoves empty tags such as `<defs></defs>` or `<g></g>`.\n\n#### clean.stripTags\n\n  * Type: `Array`\n  * Default: `['title', 'desc']`\n\nRemoves tags, that are listed in this list.\n\n#### clean.stripAttrs\n\n  * Type: `Array`\n  * Default: `[]`\n\nRemoves attributes, that are listed in this list.\n\nIf you specify a string, then use the strict comparison. You can also specify the object and the type of comparison.\n\n```js\n{\n  clean: {\n    stripAttrs: [\n      // true for: style=\"..\"\n      'style',\n      // true for: stoke=\"..\", stoke-width=\"..\", etc.\n      { pattern: 'stroke', strict: false }\n    ]\n  }\n}\n```\n\n#### clean.stripExtraAttrs\n\n  * Type: `Boolean`\n  * Default: `true`\n\nRemoves Sketch and xmlns:* attributes.\n\n#### clean.stripStyles\n\n  * Type: `Boolean|Array`\n  * Default: `true`\n\nRemoves `style` attributes from SVG definitions, or a list of the properties that will be removed from `style` tag and atrribute.\n\n## Related\n\n  * [svg2sprite-cli](https://github.com/mrmlnc/svg2sprite-cli) - CLI interface for this module.\n  * [yellfy-svg-sprite](https://github.com/mrmlnc/yellfy-svg-sprite) - svg2sprite wrapper for easy integration into the development process.\n\n## Changelog\n\nSee the [Releases section of our GitHub project](https://github.com/mrmlnc/svg2sprite/releases) for changelogs for each release version.\n\n## License\n\nThis software is released under the terms of the MIT license.\n","maintainers":[{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"}],"time":{"modified":"2022-06-27T02:38:17.635Z","created":"2016-08-15T12:37:29.580Z","1.0.0":"2016-08-15T12:37:29.580Z","2.0.0":"2016-11-23T18:07:55.662Z","2.0.1":"2016-11-23T20:01:24.964Z"},"homepage":"https://github.com/mrmlnc/svg2sprite#readme","keywords":["svg","symbol","sprite","spritesheet","generator","icon","icons"],"repository":{"type":"git","url":"git+https://github.com/mrmlnc/svg2sprite.git"},"author":{"name":"Denis Malinochkin","url":"canonium.com"},"bugs":{"url":"https://github.com/mrmlnc/svg2sprite/issues"},"license":"MIT","readmeFilename":"README.md","users":{"rubiadias":true}}