Skip to content

Grunt plugin to rasterize SVG to PNG images with different colors

License

Notifications You must be signed in to change notification settings

dailymotion/grunt-svg2png-colorfy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-svg2png-colorfy Build Status

Grunt plugin to rasterize SVG to PNG images with different colors

Getting Started

This plugin requires Grunt ~0.4.5

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

grunt.initConfig({
	svg2png_colorfy: {
		all: {
			options: {
				// A hash of colors to pass in with names
				colors: {
					primary: '#FF0000'
				}
			},
			// 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/'}
			]
		}
	}
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 0.1.1 Fix loading of grunt-svg2png tasks
  • 0.1.0 First release

Credits

  • Test icons by IcoMoon (CC BY 4.0 or GPL)

License

Copyright (c) 2015 Hein Bekker. Licensed under the MIT license.

About

Grunt plugin to rasterize SVG to PNG images with different colors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%