favico

Small favicon downloader

  • favico

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
favico
101.2.27 years ago7 years agoMinified + gzip package size for favico in KB

Readme

favico - Node.js API
Travis Build Coverage NPM Version NPM Downloads
Small favicon generator.

Features

Examples

Sample usage via Node.js API
const favico = require("favico");

favico(config)
  .then(() => console.log("Favicons are generated"));

Sample usage via CLI
favico -h
favico --config ./favicons.json

Configuration

Configuration file consists mostly of properties from RealFaviconGenerator non-interactive api. Favico use provides some useful defaults and have few additional fields:
  • output required, String - Path to output directory.
  • reuseOutput optional, Boolean - Do not download favicons if output directory is up to date.
  • cache optional, String - Path to cache directory. If is not set or set to false cache is disabled. Default value: false.
  • log optional, Function/Boolean - Function to be used for logging. It it is true then console.log is used. Default value: false.

Sample config:
{
  "output": "./build/favicons",
  "reuseOutput": true,
  "cache": "./.cache/favicons",
  "iconsPath": "/favicons",
  "masterPicture": "./favicon.png",
  "log": true,
  "design": {
    "ios": {
      "pictureAspect": "backgroundAndMargin",
      "backgroundColor": "#ffffff",
      "margin": "14%"
    },
    "desktopBrowser": {},
    "windows": {
      "pictureAspect": "noChange",
      "backgroundColor": "#da532c",
      "onConflict": "override"
    },
    "androidChrome": {
      "pictureAspect": "shadow",
      "themeColor": "#b5b5b5",
      "manifest": {
        "display": "browser",
        "orientation": "notSet",
        "onConflict": "override",
        "declared": true
      }
    },
    "safariPinnedTab": {
      "pictureAspect": "silhouette",
      "themeColor": "#5bbad5"
    }
  },
  "settings": {
    "scalingAlgorithm": "Mitchell",
    "errorOnImageTooSmall": false
  }
}