small tool to help generate icon components from a folder of SVGs (and optimizing the SVGs with the help of SVGO)
- clone the repository or just download the
dist/main.js
file - create a folder and put all your svgs into it, you can also sort SVGs in folders the components will be prefixed with the folder name.
- run
yarn start
ornode dist/main.js
- enter the relative path to the folder containing your
SVGs
default:../svgs
- enter some name for your icon library e.g.
project-icons
you may also use the tool via commandline e.g. node dist/main.js ../svgs my-icon-library
- copy the icon library folder (e.g.
project-icons
) form the/out
folder into your project - install the library via
yarn add ./someFolder/project-icons
ornpm install ./someFolder/project-icons