dbushell / grunt-svg2png

Grunt plugin to rasterize SVG to PNG images using PhantomJS
MIT License
76 stars 37 forks source link

Doesn't respect subfolders #5

Closed whatisboom closed 10 years ago

whatisboom commented 10 years ago

Using this config, svg's in subfolders of 'img-source' (ie img-source/icons/somefile.svg) would be saved to the 'root' of the img dir (ie img/icons/somefile.png)

        svg2png: {
            img: {
                files: [{
                    expand: true,
                    cwd: '/assets/img-source/',
                    src: ['**/*.svg'],
                    dest: '/assets/img/'
                }]
            }
        },
whatisboom commented 10 years ago

Solved: the src was overriding the cwd, and it was going from the project base/gruntfile location