drdk / grunt-dr-svg-sprites

Grunt plugin to create SVG sprites with PNG fallbacks at needed sizes
113 stars 19 forks source link

Aborts when destination folder does not exist #8

Closed eokic closed 10 years ago

eokic commented 10 years ago

When the folder ("sprites", in my case) does not exist, it creates the folder but fails to create the sprites afterwards.

When the folder "sprites" exists, the task continues normally.

Obviously this isn't a critical issue, but I am deleting all folders and files within the "images-dist" folder as part of a cleaning task, so the only solution for now is to make exceptions for svg-sprites folders which is impractical.

>> Running "svg-sprites:ui" (svg-sprites) task
>> Building SVG sprites...
>> Warning: EEXIST, file already exists 'images-dist/sprites/' Use --force to continue.
>> 
>> Aborted due to warnings.
phloe commented 10 years ago

Ah yes... The script currently barfs on trailing slashes - try images-dist/sprites instead of images-dist/sprites/.

It's annoying - I'll make a fix in the script so it'll handle trailing slashes correctly. In the meantime try the above ;)

eokic commented 10 years ago

Can confirm, removing the trailing slash did solve the problem. Thank you!

phloe commented 10 years ago

Finally fixed...