Grunt plugin to rasterize SVG to PNG images using PhantomJS
JavaScript
Latest commit 4f32cd4 Mar 9, 2015 @dbushell version update
Permalink
Failed to load latest commit information.
tasks Merge branch 'PR27' Mar 9, 2015
test fix file size test Jun 11, 2013
.jshintrc add svg2png tasks Jun 11, 2013
.npmignore file and directory set-up Jun 11, 2013
Gruntfile.js fix test / update version Jun 23, 2014
LICENSE.txt add license Jun 11, 2013
README.md bump version Jun 23, 2014
package.json version update Mar 9, 2015

README.md

grunt-svg2png

Grunt plugin to rasterize SVG to PNG images using PhantomJS

Getting Started

This plugin requires Grunt ~0.4.1

// Gruntfile.js configuration
grunt.loadNpmTasks('grunt-svg2png');

grunt.initConfig({
    svg2png: {
        all: {
            // specify files in array format with multiple src-dest mapping
            files: [
                // rasterize all SVG files in "img" and its subdirectories to "img/png"
                { cwd: 'img/', src: ['**/*.svg'], dest: 'img/png/' }
            ]
        }
    }
});

This task works well between SVGO Grunt and Grunt ImageOptim!

Updates

2014-06-23 pulled in path fix and option for use case without terminal. You may need to update your files config to include cwd and dest options.


Created by David Bushell | @dbushell

Copyright © 2013 David Bushell | MIT license