MMF-FE / svgicon

SVG icon components and tool set
https://mmf-fe.github.io/svgicon
MIT License
922 stars 95 forks source link

Option for don't rewrite icon.js if exist #91

Closed Smekalin closed 5 years ago

Smekalin commented 5 years ago

Hi! Has vsvg option for save built js files if I don't want replace it?

For example:
I have svg file and run vsvg -s ./static/svg/icons -t src/components/icons. I get built icon.js file and edit it. If I run vsvg old icon.js will be replaced.

Why I need it:

Mys icon.js has attributess _stroke="#D8222A" _fill="#D8222A" and default color not working. I need edit it to stroke="#D8222A" fill="#D8222A" - without underline

UPD: I wrote custom svgo config but svgo have not option for save just fill not _fill

Allenice commented 5 years ago

You can use original prop to use default colors. If you want to use original colors, you can use isOriginalDefault plugin option.

refs:

Smekalin commented 5 years ago

@Allenice Thank you! This is what I was looking for!

If I want to redefine fill color I can write color="_ black _ black _", but what should I do if I want to redefine stroke?

Smekalin commented 5 years ago

All problems is solved. I close this issue. Thanks!