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

CLI version not interpreting SVGO transform object from external config #199

Closed
Anderkins opened this issue Oct 31, 2016 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@Anderkins
Copy link

It appears that in the current implementation, the CLI version of svg-sprite doesn't obey any SVGO transform plugin rules that are passed in via an external config file.

I've tried using the config generator/kickstarter, as well as following the rules in the configuration document, to no avail. No matter what, SVGO seems to ignore my transform plugin rules (and seems to disable SVGO altogether when I attempt to configure it correctly).

After browsing through the repo, I came across the following line which appears to overwrite the external config's object with an empty array: https://github.com/jkphl/svg-sprite/blob/ff2232ff0c9d9cd022f8b4a07563ec52449653f9/bin/svg-sprite.js#L217

My current workaround is to use an empty array as a fallback, like so:

config.shape.transform = config.shape.transform || [];

This fix appears to work just fine for my local implementation, however I'm not sure if it would mess anything up with the rest of the codebase?

@mstoltenburg
Copy link

I experienced the same problem.

@jkphl
Copy link
Collaborator

jkphl commented Jun 1, 2017

The actual problem is described in more detail over at #216 — and there's also a fix for it. I'll merge that one shortly. ;)

@jkphl jkphl closed this as completed in 3f7a733 Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants