Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files are not renamed when using custom_dest #50

Open
svossen opened this issue Jun 10, 2014 · 2 comments
Open

Files are not renamed when using custom_dest #50

svossen opened this issue Jun 10, 2014 · 2 comments
Labels

Comments

@svossen
Copy link

svossen commented Jun 10, 2014

I use grunt-responsive-images to resize 2x icons to 1x icons. When I use custom_dest, the files are not renamed. When I use the regular dest the files are renamed correctly. This is my config:

responsive_images: {
    icons: {
        options: {
            sizes: [{
                name: '1x',
                width: '50%',
                height: '50%',
                suffix: '-1x'
            }, {
                name: '2x',
                width: '100%',
                height: '100%',
                suffix: '-2x'
            }]
        },
        files: [{
            expand: true,
            src: ['*.{jpg,gif,png}'],
            cwd: 'src/images/sprite/icons-original/',
            custom_dest: 'src/images/sprite/icons-{%= name %}/'
        }]
    },
}

Is there a way to use the file rename option in combination with the custom_dest option?

@svossen
Copy link
Author

svossen commented Jun 10, 2014

I made a change to the config. With his config I don't need the custom_dest function:

responsive_images: {
    "icons-1x": {
        options: {
            sizes: [{
                name: '1x',
                width: '50%',
                height: '50%'
            }]
        },
        files: [{
            expand: true,
            src: ['*.{jpg,gif,png}'],
            cwd: 'src/images/sprite/icons-original/',
            dest: 'src/images/sprite/icons-1x/'
        }]
    },
    "icons-2x": {
        options: {
            sizes: [{
                name: '2x',
                width: '100%',
                height: '100%'
            }]
        },
        files: [{
            expand: true,
            src: ['*.{jpg,gif,png}'],
            cwd: 'src/images/sprite/icons-original/',
            dest: 'src/images/sprite/icons-2x/'
        }]
    },
},

@andismith andismith added the bug label Sep 25, 2014
@mattgreenfield
Copy link

I can confirm that this is happening for me too, maybe it could be added to the docs for custom_dest in the mean time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants