1.0.0 • Published 1 year ago

fox-favicon v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Fox favicon

Webpack plugin to generate favicons

  • NPM:
    npm i fox-favicon

Сonnection:

const FoxFavicon = require('fox-favicon');

usage:

new FoxFavicon({
src: 'src/assets/images/icon/favicon.png',
path: 'assets/favicons/',
urlIcon: 'assets/favicons/',
devMode: env.isDev,
appName: 'Frontend для прагматиков',
appShortName: 'Frontend для прагматиков',
appDescription: 'Узнайте, как использовать Range Slider Fox',
developerName: 'coder1',
developerURL: 'https://github.com/coder1x/',
icons: {
  android: [
    'android-chrome-36x36.png',
    'android-chrome-48x48.png',
    'android-chrome-144x144.png',
    'android-chrome-192x192.png',
    'android-chrome-256x256.png',
  ],
  appleIcon: [
    'apple-touch-icon-180x180.png',
    'apple-touch-icon-precomposed.png',
    'apple-touch-icon.png',
  ],
  appleStartup: [],
  coast: true, // Create Opera Coast icon.
  favicons: true, // Create regular favicons.
  firefox: [
    'firefox_app_60x60.png',
    'firefox_app_128x128.png',
  ],
  opengraph: true, // Create Facebook OpenGraph image.
  twitter: true, // Create Twitter Summary Card image.
  windows: true, // Create Windows tile icons.
  yandex: true, // Create Yandex browser icon.
},
})

Settings:

OptionDefault value (possible values)TypeDescription
srcfalsebooleanaddress to the icon from which the set will be generated
path''stringAddress where to generate icons
urlIcon''stringAddress to the catalog of icons on the hosting
pathManifest'/'stringThe address where the browser will look for manifest files. (default root)
devModefalsebooleanAssembly mode
appName'null'stringYour application's name
appShortName'null'stringYour application's short_name. Optional. If not set, appName will be used
appDescription'null'stringYour application's description
developerName'null'stringYour (or your developer's) name
developerURL'null'stringYour (or your developer's) URL
dir'auto'stringPrimary text direction for name, short_name, and description
lang'en-US'stringPrimary language for name and short_name
background'#fff'stringBackground colour for flattened icons
theme_color'#fff'stringTheme color user for example in Android's task switcher
appleStatusBarStyle'black-translucent' ("black-translucent", "default", "black")stringStyle for Apple status bar
display'standalone' ("fullscreen", "standalone", "minimal-ui" , "browser")stringPreferred display mode
orientation'any' ("any", "natural", "portrait" or "landscape")stringDefault orientation
start_url'/?homescreen=1'stringStart URL when launching the application from a device
version'1.0'stringYour application's version string
loggingfalsebooleanPrint logs to console
pixel_artfalsebooleanKeeps pixels "sharp" when scaling up, for pixel art. Only supported in offline mode
loadManifestWithCredentialsfalsebooleanBrowsers don't send cookies when fetching a manifest, enable this to fix that
iconsObjectobjecttypes of icons

Icons property:

OptionDefault value (possible values)TypeDescription
androidtrueboolean, object, arrayCreate Android homescreen icon. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources
appleIcontrueboolean, object, arrayCreate Apple touch icons. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources
appleStartuptrueboolean, object, arrayCreate Apple startup images. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources
coasttrueboolean, object, arrayCreate Opera Coast icon. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources
faviconstrueboolean, object, arrayCreate regular favicons. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources
firefoxtrueboolean, object, arrayCreate Firefox OS icons. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources
windowstrueboolean, object, arrayCreate Windows tile icons. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources
yandextrueboolean, object, arrayCreate Yandex browser icon. boolean or { offset, background, mask, overlayGlow, overlayShadow } or an array of sources