1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00
Files
locomotive-boilerplate/build/svgs.js

12 lines
396 B
JavaScript
Raw Normal View History

import mixer from 'svg-mixer';
import paths from '../mconfig.json';
import message from './utils/message.js';
export function generateSpriteSVG() {
// Write sprite content on disk
mixer([paths.svgs.src + '*.svg'], {spriteConfig: { usages: false }})
.then((result) => {
message('SVG Sprite generated', 'success');
result.write(paths.svgs.dest + 'sprite.svg')
});
}