Fork me on GitHub

favicons

A Node.js module for generating favicons and their associated files. Originally built for Google's Web Starter Kit and Catalyst. Install with:

npm install favicons
Favicons

To use Favicons, require the appropriate module and call it, optionally specifying configuration and callback objects. A sample is shown on the right. The full list of options can be found on GitHub.

The Gulp wrapper modules uses the same options as Node, but has three extra properties: HTML for updating metadata, REPLACE for optionally preserving existing metadata and PIPEHTML for handling HTML piping.

Favicons generates it’s icons locally using pure Javascript with no external dependencies. However, due to extensive collaboration with RealFaviconGenerator, you can opt to have your favicons generated using their online API.

Node
Gulp
var favicons = require("favicons");

favicons({
    appName: "My App",
    appDescription: "This is my application",
    developerName: "Hayden Bleasel",
    developerURL: "http://haydenbleasel.com/",
    background: "#020307",
    path: "favicons/",
    url: "http://haydenbleasel.com/",
    display: "standalone",
    orientation: "portrait",
    version: 1.0,
    logging: false,
    online: false
}, function (error, response) {
    // Handle error and response
});