grunt-imagine icon indicating copy to clipboard operation
grunt-imagine copied to clipboard

Task throws error on jpegoptim

Open avaly opened this issue 11 years ago • 2 comments

Using v0.2.2 I get the following error when trying to run a jpgmin task:

timers.js:103
            if (!process.listeners('uncaughtException').length) throw e;
                                                                      ^
Error: ENOENT, no such file or directory 'temp/jpgmin/img/patterns/body.jpg'
    at Object.fs.openSync (fs.js:338:18)
    at Object.fs.readFileSync (fs.js:182:15)
    at Object.module.exports.grunt.registerHelper.processNextTool [as _onTimeout] (/home/dev/sites/web/node_modules/grunt-imagine/tasks/helper.js:194:59)
    at Timer.list.ontimeout (timers.js:101:19)

I only have jpegoptim installed. The output file from the first jpegoptim run is not generated.

avaly avatar Nov 26 '12 14:11 avaly

I fixed this by changing the flags for the jpegoptim to:

flags: ['-f', '--strip-all', '-d', '<outputFolder>', '<inputFile>']

avaly avatar Nov 26 '12 14:11 avaly

Don't know if this has been merged into but the current config:

flags: ['-f', '--strip-all', '< quality >', '< inputFile >', '-d', '< outputFolder >']

works fine for me though the cli states

Usage: jpegoptim [options] < filenames >

maybe we should switch parameters @asciidisco

alpadev avatar Nov 16 '13 01:11 alpadev