grunt-imagine
grunt-imagine copied to clipboard
Task throws error on jpegoptim
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.
I fixed this by changing the flags for the jpegoptim
to:
flags: ['-f', '--strip-all', '-d', '<outputFolder>', '<inputFile>']
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