Task done, but without sprite svg
stephane-r opened this issue · comments
Hi,
I test your plugin for generate svg sprite, but after start task svg_sprite, I have no output file.
My code :
svg_sprite : {
basic : {
// Target basics
expand : true,
cwd : 'images/svg/*.svg',
src : ['images/svg/*.svg'],
dest : 'out'
}
}
I've 'images/svg' folders with my all icons svg.
Can you help me ?
Thank you :)
Hi @Leg3ndz,
without having tested it: You should get rid of that *.svg
in your cwd
setting ("current working directory"). Please let me know if that works for you.
Cheers,
Joschi
Yop,
Thak you for response. I've test without "*.svg", but no result :
svg_sprite : {
basic : {
expand : true,
cwd : 'images/svg',
src : ['images/svg/*.svg'],
dest : 'out'
}
}
My svg files is all on "/images/svg/". Out folder does not create after task.
Ok, seems like there's still an error that I didn't spot in the first place. Please have a look at the example config from the docs:
your_target: {
expand : true,
cwd : 'path/to/assets',
src : ['**/*.svg'],
dest : 'path/to/css/dir',
options : {
// Target-specific options
}
},
The cwd
setting specifies the working directory, while the src
settings specifies the glob within the cwd
. So your setup would look for SVGs like images/svg/images/svg/*.svg
. Please modify your src
setting accordingly.
Cheers,
Joschi
Hi @Leg3ndz,
did you have the chance to test this again with a corrected svg
setting? Any progress on this? Thanks!
Cheers, Joschi
Good to know, and glad it works for you! Cheers!