# grunt-svg-sprites

> Takes SVGs and creates a scalable SVG sprite with PNG fallback

Latest version **1.0.0** (published 2014-09-18) · 0 weekly downloads

## Install

```sh
npm install grunt-svg-sprites
pnpm add grunt-svg-sprites
yarn add grunt-svg-sprites
bun add grunt-svg-sprites
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-09-18 |
| First published | 2014-05-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | thomaswelton |
| Maintainers | thomaswelton |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-svg-sprites
- Repository: https://github.com/thomaswelton/grunt-svg-sprites
- Issues: https://github.com/thomaswelton/grunt-svg-sprites/issues
- npm.io page: https://npm.io/package/grunt-svg-sprites

## Dependencies (2)

- [svg2png](https://npm.io/package/svg2png.md) ^1.1.0
- [gulp-svg-sprites](https://npm.io/package/gulp-svg-sprites.md) git://github.com/thomaswelton/gulp-svg-sprites.git#1.0.0

## Recent versions

- 1.0.0 (latest) — 2014-09-18
- 0.1.0 — 2014-05-30

## README

# grunt-svg-sprites

> Takes SVGs and creates a scalable SVG sprite with PNG fallback

## Getting Started
This plugin requires Grunt `~0.4.5`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-svg-sprites --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-svg-sprites');
```

## The "svg_sprites" task

### Overview
In your project's Gruntfile, add a section named `svg_sprites` to the data object passed into `grunt.initConfig()`.
The below example reads all SVGs from the `src` directory and will create the files `dest/preview-svg-sprite.html`, `dest/css/sprites.css`, `dest/sprites/png-sprite.png` and `dest/sprites/svg-sprite.svg`

```js
grunt.initConfig({
  svg_sprites: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      src: 'src/*.svg',
      dest: 'dest'
    },
  },
});
```



## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_

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