|
|
vor 10 Jahren | |
|---|---|---|
| .. | ||
| node_modules | vor 10 Jahren | |
| tasks | vor 10 Jahren | |
| test | vor 10 Jahren | |
| .jshintrc | vor 10 Jahren | |
| .npmignore | vor 10 Jahren | |
| Gruntfile.js | vor 10 Jahren | |
| LICENSE.txt | vor 10 Jahren | |
| README.md | vor 10 Jahren | |
| package.json | vor 10 Jahren | |
Grunt plugin to rasterize SVG to PNG images using PhantomJS
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!
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