broccoli-favicon

3.0.0 • Public • Published

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: {},
});

Package Sidebar

Install

npm i broccoli-favicon

Weekly Downloads

487

Version

3.0.0

License

MIT

Unpacked Size

6.79 kB

Total Files

5

Last publish

Collaborators

  • davewasmer
  • exelord