This module is to generate sprite files from icon images.
npm install @watergis/sprite-creator
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);
npm test