grunt-responsive-images icon indicating copy to clipboard operation
grunt-responsive-images copied to clipboard

Incorrect error message?

Open kokarn opened this issue 9 years ago • 0 comments

I've been using this plugin for a while and it's been working great.

Today however, I got the following error all of a sudden

Warning: Unable to resize more than one image in compact or files object format.
For multiple files please use the files array format.

The config looks like this and hasn't changed for a long time (and used to work like two weeks ago).

ingame : {
    options : {
        sizes : [{
            name : 'ingame',
            height : 64,
            width: 64,
            rename: false,
            aspectRatio: false
        }]
    },
    files : [{
        expand: true,
        cwd: 'teams/',
        src: [ '**/*.png' ],
        dest: 'web/resources/ingame/',
        rename: function( dest, src ){
            var data = jf.readFileSync( 'teams/' + src.split( '/' )[ 0 ] + '/data.json' );
            return dest + data.steam.name + '.png';
        }
    }]
},

However, if I just remove the check by commenting it out here https://github.com/andismith/grunt-responsive-images/blob/master/tasks/responsive_images.js#L223-L224 it works as intended.

Has something perhaps changed with the newer versions of node? I'm currently on 0.12.2 but it did the same on 0.12.0.

kokarn avatar Apr 02 '15 10:04 kokarn