GruntJS plugin for RealFavionGenerator is now available

The promise of RealFaviconGenerator is to let you create a multiplatform favicon within minutes, the same amount of time we needed 10 years ago when a single favicon.ico file was enough. This mission is good enough for many web projects where the favicon creation can be a one-time operation.

However, web development practices evolve and even the most static web projects now make use of build tools to automate certain tasks. CSS and JavaScript files got merged and minified. HTML pages are moved. Different versions of the same site are created. GruntJS and Gulp are the tools of choice to perform these tasks.

RealFaviconGenerator is now available in GruntJS as a plugin: grunt-real-favicon. This plugin lets you integrate RealFaviconGenerator to your web project workflow. For example:

grunt.initConfig({
  real_favicon: {
    my_icon: {
      src: 'pics/high_res_logo.png',
      dest: 'dist/path/to/icons',
      icons_path: '/path/to/icons',
      html: ['dist/index.html', 'dist/about.html'],
      design: {
        ios: {
          picture_aspect: 'background_and_margin',
          background_color: '#654321',
          margin: 4
        },
        windows: {
          picture_aspect: 'white_silhouette',
          background_color: '#123456'
        }
      },
      settings: {
        compression: 5,
        scaling_algorithm: 'NearestNeighbor'
      }
    }
  }
});

If you know GruntJS and RealFaviconGenerator, the code above should be familiar.

The plugin is just new. Expect it to evolve. I hope to receive user feedback and make it the reference for favicon generation with GruntJS!

Published by

Philippe Bernard

I'm a web developer and the author of RealFaviconGenerator. I created this site because I felt frustrated when I tried to generate the favicon of my previous web project.

3 thoughts on “GruntJS plugin for RealFavionGenerator is now available”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.