itgalaxy / favicons

Favicons generator for Node.js
MIT License
1.19k stars 164 forks source link

[FR] More granularity in icons options #311

Closed Voltra closed 4 years ago

Voltra commented 4 years ago

Current state

Currently, favicon options allow to toggle on and off certain "categories" of icons or an option object per "category" for fancy manipulations.

Use case

In the projects (websites) I work on, we only need two of the proposed "categories" : favicons and appleIcon. At first we didn't specify any options which caused to generate way too many icons. Once we specified the categories, we were left with 17 icons and we only need/use 4 of them.

Proposition

It would be appreciated to have a third type of parameter per "category": the array of names of the icons we want of that category. Thus true (or an array containing them all) would mean all of them, false (or [ ]) would mean none.

For instance :

{
  favicons: [
    "favicon-32x32.png",
    "favicon-16x16.png",
    "favicon.ico",
  ],
  appleIcon: [
    "apple-touch-icon.png",
  ],
  appleStartup: false,
  coast: false,
  android: false,
  windows: false,
  yandex: false,
  firefox: false,
}

This would allow to generate only the required icons without the need to generate more and delete some.

alexander-akait commented 4 years ago

Pr welcome

Voltra commented 4 years ago

See #312

alexander-akait commented 4 years ago

Released in 6.2.0