grunt-iconfont
v0.3.0
Published
Create icon fonts from several SVG icons.
Downloads
43
Readme
grunt-iconfont
Create icon fonts from several SVG icons.
Getting Started
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-iconfont --save
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-iconfont');
Iconfont Task
Run this task with the grunt iconfont
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Options
src
Type: string
SVG glyphs. Wildcards are supported.
dest
Type: string
Directory of the resulting font.
fontName
Type: String
Default value: targetName
A string value that is used to name your font-family.
options.*
And support all options that grunt-svgicons2svgfont
support. You could read this page for detail.
Example
grunt.initConfig({
iconfont: {
options: {
},
your_target: {
fontName: 'my-font-name', // overrides font name, would default to 'your_target' in this example
src: 'glyphs/*.svg',
dest: 'font/'
}
},
})
Contributing / Issues
You may want to contribute to this project, pull requests are welcome if you accept to publish under the MIT licence.