asciidisco/grunt-imagine

Exception when no JPEG optimizers available

Closed this issue · 1 comments

When no JPEG optimizers are available, grunt-imagine's jpgmin task throws this exception:

Fatal error: Object #<Object> has no method 'helper'
TypeError: Object #<Object> has no method 'helper'
    at exports.processImageFiles (/path/to/grunt-imagine/lib/helpers.js:56:19)
    at /path/to/grunt-imagine/tasks/jpgmin.js:51:6

That points to this line:

    // check if there are usable tools
    if (numberOfTools === 0) {
->      grunt.helper('no tool installed', tools, task, done);
    }

It seems the update fixed it as well. Working fine for now.

Running "jpgmin" task

Running jpegoptim, jpegtran, jpegrescan...ERROR
>> In order for this task to work properly, one of these tools "jpegoptim,
>> jpegtran, jpegrescan" must be installed and in the system PATH (if you can
>> run one of these commands "jpegoptim, jpegtran, jpegrescan" at the command
>> line, this task should work)

Skiping jpgmin task

Closing this. Greets.