gensprite

1.1.4 • Public • Published

gensprite logo

gensprite

Incredibly simple and small library for svg sprites.

Installation

npm install --save-dev gensprite

Using

All that is needed for the library to work is:

  1. Folder with svg files
  2. The html page in which the svg sprite will be inserted

Launch occurs through the command line:

gensprite

Work parameters can be specified:

  1. Via command line arguments
  2. In package.json of your project in "gensprite" property
Parameter cli package.json Default
The path to the image folder --img or -i "imgFolder" ./src/assets/img
The path to the "index" page --output or -o "indexFile" ./src/index.html
Sprite tag id --spriteId or -s "spriteId" svg-sprite

Core concepts

Tiny gen sprite uses <symbol> way to make svg sprites.

Examples

Launch with command line arguments

gensprite -o="./index.html" --img="./images"

Parametrs in package.json:

{
  "name": "example-project",
  "version": "1.0.0",
  "gensprite": {
    "imgFolder": "./src/images/svg",
    "spriteId": "my-sprite"
  }
}

License

MIT

Package Sidebar

Install

npm i gensprite

Weekly Downloads

5

Version

1.1.4

License

MIT

Unpacked Size

14 kB

Total Files

9

Last publish

Collaborators

  • vasbaz