Skip to content

This module is to generate sprite files from icon images.

License

Notifications You must be signed in to change notification settings

watergis/sprite-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sprite-creator

GitHub

This module is to generate sprite files from icon images.

Installation

npm install @watergis/sprite-creator

Usage

const SpriteCreator = require('@watergis/sprite-creator');

const config = {
    sprites:[
      {
        output_dir: path.resolve(__dirname,'./sprite'), //Output directory path for sprite files
        icons: [
          path.resolve(__dirname,'./icons'), //Input directory path for SVG icons
        ],
      }
    ]
};

const spriteCreator = new SpriteCreator();
spriteCreator.build(config.sprites);

Test

npm test