Svgo: Multiple files CLI

Created on 3 Aug 2017  Â·  5Comments  Â·  Source: svg/svgo

lint-staged is very useful with svgo (it will send to svgo` any new or changed SVG).

But lint-staged pass all file names in single command TOOL FILE1 FILE2 FILE3.

svgo falls in this case. Also when you change only two files lint-staged called it with svgo one.svg two.svg which even broke uncommit files :(.

@GreLI do we have any solution for this? If not. just give me CLI API — I will send PR.

Most helpful comment

Actually, I'm working on it right now.

All 5 comments

Actually, I'm working on it right now.

JFYI, for now current CLI API is

svgo <input-file> <output-file>

(and I want to change that.)

Hi, @GreLI!

Any progress on this issue? lint-staged and svgo are a great couple, but it's annoying to commit not more than one SVG file per commit.

Thanks!

I took a stab at this in #786, people are reaching for the same things for pre-commit

Finally, It has been done it in e3ddf1d96ab88beb9f496a122dee6ebcb4a0c907. Now

svgo *.svg

will work as expected. Haven't updated docs yet to avoid confusion until it'll get released.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

madysondesigns picture madysondesigns  Â·  4Comments

pixelass picture pixelass  Â·  6Comments

alex3165 picture alex3165  Â·  6Comments

crybat picture crybat  Â·  6Comments

happyPanghu picture happyPanghu  Â·  3Comments