jacobparis-insiders / sly

Monorepo for Sly CLI
https://sly-cli.fly.dev/
153 stars 11 forks source link

Convert svg icons to sprites #42

Closed nirtamir2 closed 6 months ago

nirtamir2 commented 6 months ago

Hi I want to use this library to convert svg files to sprites. Let's say I have a.svg, b.svg, c.svg both located under /assets directory. How I use them as icons with SVG sprites automatically? Is this library intended to do different stuff?

Thanks!

jacobparis commented 6 months ago

Yeah that's a little out of scope

This library helps you get those SVGs into your codebase, and it can be configured to run extra scripts every time you do that (for example to build a spritesheet) but Sly itself does not build the spritesheet. Icons are just one of the many types of code you can add with it

You're better served with svg-icons-cli, which works well with Sly but can be used independently if you already have all the SVG files you need

https://www.jacobparis.com/content/svg-icons-with-cli