svg-sprite / grunt-svg-sprite

SVG sprites & stacks galore — Grunt 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

Home Page:https://github.com/svg-sprite/svg-sprite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Console error message missing when sprite compilation failed

ducin opened this issue · comments

Currently, when you've got an error in your grunt config which will lead to compilation error, you will see that everything is alright and it's misleading:

Tomasz.Ducin@WAWLT548 ~/Tests/svg-sprite-test
$ grunt --force
Running "svg_sprite:basic" (svg_sprite) task

Running "svg_sprite:basic2" (svg_sprite) task


Running "svg_sprite:flags" (svg_sprite) task


Done, without errors.

And the truth is that spriter.compile(function(error, result) { ... } throws an error in fact. Currently, it is handled in the following way:

if (error) {

} else {

which I find a very bad solution. I suggest to provide a standard grunt fail output so that the developer at least knows, that something is wrong with his configuration (e.g. grunt.fail).

The solution for this is done in #39.

Hey @tkoomzaaskz,

awesome — thanks for this contribution. I must have overseen that I never finished that one! 👍

Cheers,
Joschi