Skip to content

netbek/grunt-rappar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-rappar Build Status

Grunt plugin to convert SVG to Raphaël instructions.

Getting Started

This plugin requires Grunt ~0.4.5

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

grunt.initConfig({
	rappar: {
		all: {
			options: {
				// String to prepend to JS output. Supports text pattern replacement (see below).
				prepend: "window.App.library.shape['@@filename'] = ",
				// String to append to JS output. Supports text pattern replacement (see below).
				append: ";"
			},
			// Specify files in array format with multiple src-dest mapping
			files: [{cwd: 'test/files/src/', src: ['*.svg'], dest: 'test/files/dest/'}]
		}
	}
});

Text pattern replacements

  • filename: basename without extension

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 Rename prefix and suffix options to prepend and append respectively
  • 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 convert SVG to Raphaël instructions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published