fontello-update

Updates your Fontello files from your current Fontello session or config.

Fontello-update

Easily update your Fontello config with this nodejs package.

  1. Run fontello-update with an initial fontello config.
  2. Pick and remove fonts on the website and press the 'Save session' button.
  3. Run fontello-update to download the new config and font files.

Use together with grunt-fontello to automatically download the latest package.
Use together with grunt-fontello-update to run fontello update as a Grunt task.

 
var fontelloUpdate = require('fontello-update');
 
fontelloUpdate({
   config: 'fontello.json',
   fonts: 'public/font',
   css: 'public/css'
});
 
  • config - The config file to use. Default: 'config.json'.
  • overwrite - Overwrite existing config file. Default: true.
  • fonts - Font files' destination: Default: 'fonts'.
  • css - Stylesheets' destination: Default: 'css'.
  • open - Open the package on the fontello website. Default: false.
  • updateConfigOnly - Only update the config file (ie don't extract font and css files). Default: false.
  • session - The session to use. Default: null.

The fontello update function returns a promise. For example, to use it in an asyncronous Grunt task, you would do something like:

 
function fontelloUpdate()
{
   var done = this.async();
   var fontelloUpdate = require('fontello-update');
   
   fontelloUpdate({
           config: 'fontello.json',
           dest: 'fontello.json'
       })
       .then(done)
       .catch(done)
   ;
}