gulp-fontello-config
Parse your HTML and generate the fontello config file
Usage
In your HTML, add the name of the fontello font and the name of the glyph (icon) you want.
Test file
In your gulpfile.js
, add the task:
var gulp = rename = fontelloConfig = ; gulp; // Gulp Default Taskgulp;
See build
for output.
Use the fontello-cli
package to download your fonts.
var gulp = rename = fontelloConfig = exec = exec; gulp; ; // Gulp Default Taskgulp;
See test/src/assets
for output.
Now you can add the tag link
in your HTML by using gulp-inject-string
:
var gulp = inject = ; gulp;
Using options
You can use aliases to simplify your HTML code. For example, instead to use fontawesome icon-facebook
, you can use fa icon-facebook
.
Test file with alias and prefix
In your gulpfile.js
:
var gulp = rename = fontelloConfig = ; var options = name: 'fontello' // The font name. Will be used as file name prefix: 'fa-' // The default css prefix suffix: false // The css suffix hinting: 1000 units: 1000 // Units per em ascent: 85 alias: // Alias to use for parsing fontawesome: 'fa' fontelico: 'fo' entypo: 'en' packs: 'meteocons' // Use this option to add all glyphs in the // fonts pack meteocons for example { // The callback function // you can change config object here // config.glyphs contains glyphs } ; gulp;