Skip to content

Takes a single favicon.png and outputs various sizes and file formats for favicons for different platforms and devices.

License

Notifications You must be signed in to change notification settings

davewasmer/broccoli-favicon

Repository files navigation

broccoli-favicon

Build Status Dependency Status

Takes a single favicon.png and outputs various sizes and file formats for favicons for different platforms and devices. Uses favicons, see that projects documentation for details on the full range of support favicon generation.

Usage

Default configuration values are show below:

import Favicon from "broccoli-favicon";

const outputNode = new Favicon(nodeWithFaviconImage, {
  iconPath: "favicon.png", // The path to the source image in 'nodeWithFaviconImage'

  onSuccess(htmlArray, rawObject) {
    // this method is called once the generator finishes;
    // the first parameter is an array of strings containing
    // the appropriate HTML to use the generated icons
    // and the second argument is a raw object containing serialized html objects
  },

  // The favicons config object is passed directly to the underlying `Favicons` module
  // See https://github.com/haydenbleasel/favicons for details and defaults
  faviconsConfig: {},
});

About

Takes a single favicon.png and outputs various sizes and file formats for favicons for different platforms and devices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published