Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #690: Add option to process folders recursively. #712

Merged
merged 1 commit into from
May 11, 2017

Conversation

justrhysism
Copy link
Contributor

@justrhysism justrhysism commented May 4, 2017

Resolves #690

Added --recursive/-r flag to process folders recursively.

Usage: svgo -f ./my-folder -r

Just before checking if the "file" is an SVG, check if it's actually a directory and call optimizeFolder() on that directory.

Let me know if you require any further adjustments. I wanted to keep them as light as possible.

@GreLI GreLI merged commit c943b4c into svg:master May 11, 2017
@GreLI
Copy link
Member

GreLI commented May 11, 2017

Looks nice. Thanks!

@lipis
Copy link

lipis commented May 11, 2017

fabulous2

@GreLI
Copy link
Member

GreLI commented May 11, 2017

Actually, it works even without -f since SVGO recognizes when folder's been passed.

@justrhysism
Copy link
Contributor Author

Ah nice!

@stephan-v
Copy link

Can this also copy over the directory structure to the output directory? I am looking for that.

@justrhysism
Copy link
Contributor Author

Can this also copy over the directory structure to the output directory? I am looking for that.

Haven't tested it with a different output directory. I suggest creating a new issue for that feature.

@epavletic
Copy link

@GreLI Do you know if this feature will be available in a release anytime soon?

@GreLI
Copy link
Member

GreLI commented Oct 11, 2017

Unfortunately, it has been lost it in some rewriting. New request is needed.

@dartess
Copy link
Contributor

dartess commented Nov 2, 2017

help pls

svgo -f local/assets/images/svg --recursive --disable=removeViewBox --multipass 
Unknown option: --recursive

svgo 1.0.0, what am I doing wrong?

@GreLI
Copy link
Member

GreLI commented Nov 3, 2017

svgo 1.0.0, what am I doing wrong?

Haven't read the comment before.

@dabutvin
Copy link
Contributor

@GreLI i opened #861 to add the recursive flag back :)

@tomanistor
Copy link

Getting Unknown option: --recursive and Unknown option: -r on version 1.0.3

@epavletic
Copy link

@tomanistor That's because @dabutvin's PR to add back the functionality has not been merged yet and thus, is not available in a release.

@tomanistor
Copy link

@epavletic Ah I see now - didn't catch that it was still an open PR. Hopefully it's added back in soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants