Uses gulp-iconfont. Grabs a folder of SVG icons and turns them into font icons, creates a Sass mixin and class for each based on filename, adds all to a demo page.
Usage¶
Given a file named facebook.svg
, you can use this Sass mixin:
@include icon('facebook');
Or this HTML class:
<span class="icon--facebook"></span>
Commands¶
gulp icons
- Compile Iconsgulp watch:icons
- Watch for icons and compile
Config¶
config.icons.src
- Array or String of globbed SVG filesconfig.icons.dest
- Destination directory for the fontsconfig.icons.fontPathPrefix
- Font path prefixconfig.icons.iconName
- Name of the icon (will be the name of the font)config.icons.classNamePrefix
- Icon class name prefix (default: "icon")config.icons.templates.css.dest
- The generated SCSS file