fannypack-less
Official Fannypack task for generating an Icon Font from SVG files.
Installation
npm install fannypack-iconfont --save-dev
Usage
var Fannypack = require('fannypack')
require('fannypack-iconfont')
Fannypack.Config.iconFont = {
src: 'icons',
sassDest: 'base',
dest: 'assets/fonts',
watchTask: true,
assetTask: true,
extensions: ['woff2', 'woff', 'eot', 'ttf', 'svg']
}
Fannypack.init()
SVG Files
All files should be the same size, and it is recommended that they be at least 250x250 pixels.
Naming your SVG file house.svg
will create a SASS variable ($icon-house
) and a CSS class (.icon--house
).