-
Notifications
You must be signed in to change notification settings - Fork 252
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: can't load all svg files if there are subfolders #220
Comments
I updated the command with quotes for the input:
Now the icons are all loaded correctly. I tried to add two icons with the same name (sample1.svg), one in svg folder and one in group folder.
The script seems to generate two symbols with the same id. I guess the id of the icon in group folder should be something like Thanks |
@ninjabachelor Well, the first part of your question is easily explained (and partly unrelated to svg-sprite): Without the quotes around Your second question might be a little more tricky. In general, the relative file path should be used for creating the shape ID, defaulting to a simple algorithm that basically replaces slashes with double dashes. For instance, the file |
Thanks @jkphl !
I've created a grunt config with the same settings, and it generates 4 symbols but with no colliding ids:
Is there something missing in my cli configuration? Or it could be a cli script issue? Thanks again, |
Hi there, I'm noticing the same issue with the CLI -- when using a glob pattern like Thanks! |
I added a simple option to set a "base directory" for globbing that should help you. Please let me know if it doesn't! |
Hey @jkphl, I'm trying to run this from CLI in my npm build script. I've surrounded the path for the last argument in single quotation marks but nothing happens (stylesheet and spritesheet are both empty). Any ideas? |
@elina-codes, could you please post your complete CLI command here? Thanks! |
It's the final argument in the '' that is causing me trouble. When I remove the quotes, it works fine. My final command will be using globbing, but I've found that even this simple test results in the same problem. Thanks for your help @jkphl ! |
This isn't working for me:
I'm not sure but could it be related to running this on windows? |
Hi,
here's the command I'm using:
svg-sprite --config svg-sprite.dev.json ./sprite/svg/**/*.svg
Here's the configuration:
And here's my folder structure. There are 2 icons in svg folder, and two in the subfolder group.
The script seems to ignore the icons in the svg folder, and only load the ones in group. If I remove the group folder, it correctly loads the icons in svg folder.
Versions:
svg-sprite: 1.3.6
node: 7.5.0
Thanks for all the work!
Alberto
The text was updated successfully, but these errors were encountered: