Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.
/ yellfy-svg-sprite Public archive

🐺 svg2sprite wrapper for easy integration into the development process.

License

Notifications You must be signed in to change notification settings

mrmlnc/yellfy-svg-sprite

Repository files navigation

yellfy-svg-sprite

svg2sprite wrapper for easy integration into the development process.

Travis Status

Install

$ npm i -D yellfy-svg-sprite

Usage

const svgSprite = require('yellfy-svg-sprite');

svgSprite.makeSprite('dir/containing/svg/files').then((result) => {
  console.log(result.sprite);
  // <?xml version="1.0"...

  return result.write('filepath/to/save/sprite.svg');
});

Supported methods

.makeSprite(sourceDir, ignore, [options])result

ignore

  • Type: Array
  • Default: ['!*.svg']

Array glob-patterns for files that will not be added to the sprite.

options

See svg2sprite repository.

result

sprite

  • Return: String

Sprite data.

write(filepath)

A feature that allows you to write the resulting sprite to disk.

Related

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.

About

🐺 svg2sprite wrapper for easy integration into the development process.

Resources

License

Stars

Watchers

Forks

Packages

No packages published