svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
647 stars 43 forks source link

documentation suggestion #27

Closed dadaphl closed 9 years ago

dadaphl commented 9 years ago

gulp.src('*/.svg', {cwd: 'assets'})

is misleading for a gulp beginner. I thought the cwd:'assets' part is some kind of configuration option. It took me a while to figure out, that that was the reason my images weren't found. Also the, there is no output from gulp that indicates what it is doing. Hard locate mistakes.

jkphl commented 9 years ago

Hey @dadaphl,

thanks for reporting this. Although I understand your concerns — especially because I'm a Gulp beginner myself — I don't really know how to deal with it. What do you suggest?

The line

gulp.src('*/.svg', {cwd: 'assets'})

strictly isn't part of gulp-svg-sprite at all. I think it's beyond gulp-svg-sprite's scope to explain the way of globbing in gulp — that knowledge should be seen as a pre-requisite. IMO it's rather important to showcase that there is the cwd option for gulp.src(), as omitting it in the documentation would surely provoke another documentation suggestion ...

Do you think changing "assets" to "path/to/assets" and / or adding a hint to Gulp's globbing options would improve the situation?

Thanks & cheers, Joschi

jkphl commented 9 years ago

As you didn't feedback anymore, I modified the documentation as suggested and will close this issue now. Please feel free to re-open it in case of further problems.