You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to be caused by the way that svg-sprite.js merges the config file settings (lines 166-197) with the command line settings returned from the yargs library (lines 158-163) and then assumes that the valid svg.rootAttributes value should be a string (line 207.)
If I have time this weekend I will try to prepare a PR to fix this.
The text was updated successfully, but these errors were encountered:
The problem was the internal handling of the rootAttributes option in CLI. It was expected to be a string (file path) even if it had already been set via an external config file. Should be fixed now. :)
When running the svn-sprite command line tool to generate our SVG sprite sheets, we are seeing the following error message:
[ERROR] Skipping --svg-rootattrs file due to errors ("Path must be a string. Received { preserveAspectRatio: 'none' }")
The tool generates a sprite sheet file, but the attributes are not added to the resulting file.
I can reproduce the error with this command line and the attached config file:
svg-sprite.js --css css-render-css --dest=out --config=./svg-sprite.json iconsets/*.svg
svn-sprite.json:
{ "svg": { "rootAttributes": { "preserveAspectRatio": "none" } }, "log": "info" }
This appears to be caused by the way that svg-sprite.js merges the config file settings (lines 166-197) with the command line settings returned from the yargs library (lines 158-163) and then assumes that the valid svg.rootAttributes value should be a string (line 207.)
If I have time this weekend I will try to prepare a PR to fix this.
The text was updated successfully, but these errors were encountered: