Skip to content

Grunt plugin to rasterize SVG to PNG images using PhantomJS

License

Notifications You must be signed in to change notification settings

rinderschwein/grunt-svg2png

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
                { src: ['img/**/*.svg'], dest: 'img/png/' },
                // rasterize SVG file to same directory
                { src: ['img/logo.svg'] }
            ]
        }
    }
});

This task works well between SVGO Grunt and Grunt ImageOptim!


Created by David Bushell | @dbushell

Copyright © 2013 David Bushell | MIT license

About

Grunt plugin to rasterize SVG to PNG images using PhantomJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%