Nukem's Possible Manifestation
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

svgdir2sprite

1.0.2 • Public • Published

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

install

npm i svgdir2sprite

Downloadsweekly downloads

1

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability