Creates a spritesheet from a directory of svgs.
Find a file
dependabot[bot] d933754238
Bump lodash from 4.17.11 to 4.17.14
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 14:22:34 +00:00
.gitignore v1.0 First Commit 2017-04-25 07:01:39 -05:00
cli.js Fixed uncaught error when used as node module. Updated deps. 2019-01-02 23:55:10 -06:00
index.js Fixed uncaught error when used as node module. Updated deps. 2019-01-02 23:55:10 -06:00
package-lock.json Bump lodash from 4.17.11 to 4.17.14 2019-07-14 14:22:34 +00:00
package.json 1.0.3 2019-02-16 13:47:11 -06:00
README.md npm badge 2018-02-22 19:39:08 -06:00

svgdir2sprite

npm version

Creates a spritesheet from a directory of svgs. Can return the results directly or write to a spritesheet svg file. Node based and powered by svg2sprite.

As a Module

npm install --save svgdir2sprite

Return SVG Spritesheet as String

const svgdir2sprite = require('svgdir2sprite');

svgdir2sprite('./src/svgs') // Async Promise
.then((svgContent) => console.log(svgContent));

Write SVG Spritesheet to File

const svgdir2sprite = require('svgdir2sprite');

svgdir2sprite('./src/svgs', './build/spritesheet.svg');

From the CLI

npm install -g svgdir2sprite

Return SVG Spritesheet to the Console

svgdir2sprite ./src/svgs

Write SVG Spritesheet to File

svgdir2sprite ./src/svgs ./build/spritesheet.svg