1.1.0 • Published 2 years ago

@such-code/svg-sprite v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

About

This tool helps to generate sprite for svg-images. It can consume JSON configuration file with a list of svg images or file list found by glob.

Usage

Using configuration file

Content of config.json:

[
  "image-1.svg",
  "subdir/image-2.svg"
]
svg-sprite --config config.json --output sprite.svg --prefix "px-"

Glob configuration

svg-sprite --source "./assets/**/*.svg" --output sprite.svg

Known issues

  • symbol id is generated from file name and could be repeated by another file with same name but in another directory;
  • result should be properly formatted.
1.1.0

2 years ago

1.0.0

2 years ago