# svg-sprite-data

> Create SVG sprite data only

Latest version **3.1.0** (published 2017-03-15) · 0 weekly downloads

## Install

```sh
npm install svg-sprite-data
pnpm add svg-sprite-data
yarn add svg-sprite-data
bun add svg-sprite-data
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2017-03-15 |
| First published | 2014-07-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Shane Osbourne |
| Maintainers | shakyshane, soenkekluth |
| Keywords | icon, icons, svg, png, sprite, generator, css, sass, less, vector, rwd, retina |

## Links

- npm: https://www.npmjs.com/package/svg-sprite-data
- Repository: https://github.com/shakyshane/svg-sprite-data
- Issues: https://github.com/shakyshane/svg-sprite-data/issues
- npm.io page: https://npm.io/package/svg-sprite-data

## Dependencies (7)

- [svgo](https://npm.io/package/svgo.md) 0.6.6
- [async](https://npm.io/package/async.md) 2.0.1
- [cssom](https://npm.io/package/cssom.md) 0.3.1
- [lodash](https://npm.io/package/lodash.md) 4.14.1
- [xml-parser](https://npm.io/package/xml-parser.md) ^1.2.1
- [svg-cleaner](https://npm.io/package/svg-cleaner.md) 0.0.4
- [css-selector-parser](https://npm.io/package/css-selector-parser.md) 1.1.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 3.1.0 (latest) — 2017-03-15
- 3.0.0 — 2016-08-05
- 2.0.0 — 2015-06-11
- 1.0.1 — 2015-01-21
- 1.0.0 — 2015-01-21
- 0.0.5 — 2014-08-23
- 0.0.4 — 2014-08-23
- 0.0.3 — 2014-07-20
- 0.0.1 — 2014-07-18

## README

svg-sprite-data
===============

An attempt to make the [svg-sprite](https://github.com/jkphl/svg-sprite) lib work on strings only which 
will allow everyone to create their own awesome libs on top of it.

The idea is to remove ALL file-system access and leave all that to the authors who create tools on top of this. So, this
module only has a couple of methods, only accepts strings & only returns data - it never touches anything on the file-system.

##Usage

```js
var SpriteData = require("svg-sprite-data");
var fs  = require("fs");

var config = {
    common: "icon",
    dims: true,
    layout: "diagonal",
    render: {
        css: true
    }
};

// Create instance
var spriter = new SpriteData(config);

// Read a file however you like
var path = "./test/fixtures/fb.svg";
var svg  = fs.readFileSync(path, "utf-8");

// Add the files CONTENTS only.
spriter.add(path, svg).compile(function (err, svg) {

    // Do crazy-ass shit with templates etc
    console.log(svg);

});
```

---
_Source: https://npm.io/package/svg-sprite-data · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
