Code Monkey home page Code Monkey logo

favicons's Introduction

Favicons

NPM version Build Status

A Node.js module for generating favicons and their associated files. Originally built for Google's Web Starter Kit and Catalyst. Installed through NPM with:

npm install favicons

Usage

To use Favicons, require the appropriate module and call it, optionally specifying configuration and callback objects. A sample is shown on the right. The full list of options can be found on GitHub.

Favicons generates its icons locally using pure Javascript with no external dependencies.

Please note: Favicons is tested on Node 14 and above.

import { favicons } from "favicons";

const source = "test/logo.png"; // Source image(s). `string`, `buffer` or array of `string`

const configuration = {
  path: "/", // Path for overriding default icons path. `string`
  appName: null, // Your application's name. `string`
  appShortName: null, // Your application's short_name. `string`. Optional. If not set, appName will be used
  appDescription: null, // Your application's description. `string`
  developerName: null, // Your (or your developer's) name. `string`
  developerURL: null, // Your (or your developer's) URL. `string`
  cacheBustingQueryParam: null, // Query parameter added to all URLs that acts as a cache busting system. `string | null`
  dir: "auto", // Primary text direction for name, short_name, and description
  lang: "en-US", // Primary language for name and short_name
  background: "#fff", // Background colour for flattened icons. `string`
  theme_color: "#fff", // Theme color user for example in Android's task switcher. `string`
  appleStatusBarStyle: "black-translucent", // Style for Apple status bar: "black-translucent", "default", "black". `string`
  display: "standalone", // Preferred display mode: "fullscreen", "standalone", "minimal-ui" or "browser". `string`
  orientation: "any", // Default orientation: "any", "natural", "portrait" or "landscape". `string`
  scope: "/", // set of URLs that the browser considers within your app
  start_url: "/?homescreen=1", // Start URL when launching the application from a device. `string`
  preferRelatedApplications: false, // Should the browser prompt the user to install the native companion app. `boolean`
  relatedApplications: undefined, // Information about the native companion apps. This will only be used if `preferRelatedApplications` is `true`. `Array<{ id: string, url: string, platform: string }>`
  version: "1.0", // Your application's version string. `string`
  pixel_art: false, // Keeps pixels "sharp" when scaling up, for pixel art.  Only supported in offline mode.
  loadManifestWithCredentials: false, // Browsers don't send cookies when fetching a manifest, enable this to fix that. `boolean`
  manifestMaskable: false, // Maskable source image(s) for manifest.json. "true" to use default source. More information at https://web.dev/maskable-icon/. `boolean`, `string`, `buffer` or array of `string`
  icons: {
    // Platform Options:
    // - offset - offset in percentage
    // - background:
    //   * false - use default
    //   * true - force use default, e.g. set background for Android icons
    //   * color - set background for the specified icons
    //
    android: true, // Create Android homescreen icon. `boolean` or `{ offset, background }` or an array of sources
    appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background }` or an array of sources
    appleStartup: true, // Create Apple startup images. `boolean` or `{ offset, background }` or an array of sources
    favicons: true, // Create regular favicons. `boolean` or `{ offset, background }` or an array of sources
    windows: true, // Create Windows 8 tile icons. `boolean` or `{ offset, background }` or an array of sources
    yandex: true, // Create Yandex browser icon. `boolean` or `{ offset, background }` or an array of sources
  },
  shortcuts: [
    // Your applications's Shortcuts (see: https://developer.mozilla.org/docs/Web/Manifest/shortcuts)
    // Array of shortcut objects:
    {
      name: "View your Inbox", // The name of the shortcut. `string`
      short_name: "inbox", // optionally, falls back to name. `string`
      description: "View your inbox messages", // optionally, not used in any implemention yet. `string`
      url: "/inbox", // The URL this shortcut should lead to. `string`
      icon: "test/inbox_shortcut.png", // source image(s) for that shortcut. `string`, `buffer` or array of `string`
    },
    // more shortcuts objects
  ],
};

try {
  const response = await favicons(source, configuration);

  console.log(response.images); // Array of { name: string, contents: <buffer> }
  console.log(response.files); // Array of { name: string, contents: <string> }
  console.log(response.html); // Array of strings (html elements)
} catch (error) {
  console.log(error.message); // Error description e.g. "An unknown error has occurred"
}

The default sources are as follow (groupped by platform):

{
  "android": [
    "android-chrome-144x144.png",
    "android-chrome-192x192.png",
    "android-chrome-256x256.png",
    "android-chrome-36x36.png",
    "android-chrome-384x384.png",
    "android-chrome-48x48.png",
    "android-chrome-512x512.png",
    "android-chrome-72x72.png",
    "android-chrome-96x96.png"
  ],
  "appleIcon": [
    "apple-touch-icon-1024x1024.png",
    "apple-touch-icon-114x114.png",
    "apple-touch-icon-120x120.png",
    "apple-touch-icon-144x144.png",
    "apple-touch-icon-152x152.png",
    "apple-touch-icon-167x167.png",
    "apple-touch-icon-180x180.png",
    "apple-touch-icon-57x57.png",
    "apple-touch-icon-60x60.png",
    "apple-touch-icon-72x72.png",
    "apple-touch-icon-76x76.png",
    "apple-touch-icon-precomposed.png",
    "apple-touch-icon.png"
  ],
  "appleStartup": [
    "apple-touch-startup-image-1125x2436.png",
    "apple-touch-startup-image-1136x640.png",
    "apple-touch-startup-image-1242x2208.png",
    "apple-touch-startup-image-1242x2688.png",
    "apple-touch-startup-image-1334x750.png",
    "apple-touch-startup-image-1536x2048.png",
    "apple-touch-startup-image-1620x2160.png",
    "apple-touch-startup-image-1668x2224.png",
    "apple-touch-startup-image-1668x2388.png",
    "apple-touch-startup-image-1792x828.png",
    "apple-touch-startup-image-2048x1536.png",
    "apple-touch-startup-image-2048x2732.png",
    "apple-touch-startup-image-2160x1620.png",
    "apple-touch-startup-image-2208x1242.png",
    "apple-touch-startup-image-2224x1668.png",
    "apple-touch-startup-image-2388x1668.png",
    "apple-touch-startup-image-2436x1125.png",
    "apple-touch-startup-image-2688x1242.png",
    "apple-touch-startup-image-2732x2048.png",
    "apple-touch-startup-image-640x1136.png",
    "apple-touch-startup-image-750x1334.png",
    "apple-touch-startup-image-828x1792.png",
    "apple-touch-startup-image-1179x2556.png",
    "apple-touch-startup-image-2556x1179.png",
    "apple-touch-startup-image-1290x2796.png",
    "apple-touch-startup-image-2796x1290.png",
    "apple-touch-startup-image-1488x2266.png",
    "apple-touch-startup-image-2266x1488.png",
    "apple-touch-startup-image-1640x2360.png",
    "apple-touch-startup-image-2360x1640.png"
  ],
  "favicons": [
    "favicon-16x16.png",
    "favicon-32x32.png",
    "favicon-48x48.png",
    "favicon.ico"
  ],
  "windows": [
    "mstile-144x144.png",
    "mstile-150x150.png",
    "mstile-310x150.png",
    "mstile-310x310.png",
    "mstile-70x70.png"
  ],
  "yandex": [
    "yandex-browser-50x50.png"
  ]
}

You can programmatically access Favicons configuration (icon filenames, HTML, manifest files, etc) with:

import { config } from "favicons";

Below you will find a simple working example to generate an output. Amend the src, dest, htmlBasename and configuration constants to suit your own needs.

import favicons from "favicons";
import fs from "fs/promises";
import path from "path";

const src = "./icon.svg"; // Icon source file path.
const dest = "./favicons"; // Output directory path.
const htmlBasename = "index.html"; // HTML file basename.

// Configuration (see above in the README file).
const configuration = {
  path: "/favicons",
  appName: "My Great App",
  appShortName: "Great App",
  appDescription: "A great application to test itgalaxy/favicons.",
  // Extra options...
};

// Below is the processing.
const response = await favicons(src, configuration);
await fs.mkdir(dest, { recursive: true });
await Promise.all(
  response.images.map(
    async (image) =>
      await fs.writeFile(path.join(dest, image.name), image.contents),
  ),
);
await Promise.all(
  response.files.map(
    async (file) =>
      await fs.writeFile(path.join(dest, file.name), file.contents),
  ),
);
await fs.writeFile(path.join(dest, htmlBasename), response.html.join("\n"));

Questions

Why are you missing certain favicons?

Because pure Javascript modules aren't available at the moment. For example, the El Capitan SVG favicon and the Windows tile silhouette ability both require SVG support. If modules for these task begin to appear, please jump on the appropriate issue and we'll get on it ASAP.

Thank you

Contribution

Feel free to push your code if you agree with publishing under the MIT license.

When testing, don't forget to update snapshots whenever you edit them: npm test -- -u.

favicons's People

Contributors

adjohnson916 avatar ahukkanen avatar alexander-akait avatar andrey-hohlov avatar andy128k avatar aprys avatar brunocodutra avatar dangreen avatar dependabot[bot] avatar dmnsgn avatar evilebottnawi avatar graham42 avatar guilouro avatar jameswilddev avatar jessaustin avatar justgook avatar kb3eua avatar kghost avatar markmiro avatar mikelambert avatar niktekusho avatar perrin4869 avatar phbernard avatar rezyan avatar rotzbua avatar sylvaindumont avatar synedra-mpe avatar uwolfer avatar vincemalone avatar voltra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

favicons's Issues

Transparency

How can I make my icons keep their transparent background? There doesn't seem to be a way.

TypeError thrown using default options

path.js:360
        throw new TypeError('Arguments to path.join must be strings');
        ^
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at /Users/tom/Projects/src/chrome/ehealth/direct-delivery/node_modules/favicons/index.js:321:76
    at /Users/tom/Projects/src/chrome/ehealth/direct-delivery/node_modules/favicons/index.js:88:24
    at /Users/tom/Projects/src/chrome/ehealth/direct-delivery/node_modules/favicons/index.js:79:24
    at ChildProcess.exithandler (child_process.js:646:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)

Improve API

The option object is not very readable:

favicons({
    // I/O
    source: 'logo.png',
    dest: 'images',

    // Icon Types
    android: true,
    apple: true,
    coast: true,
    favicons: true,
    firefox: true,
    opengraph: true,
    windows: true,

    // Miscellaneous
    html: null,
    background: '#1d1d1d',
    tileBlackWhite: false,
    manifest: null,
    trueColor: false,
    url: null,
    logging: false,
    callback: null
});

I suggest you do the following changes:

  • Move the Icon types section into a sub-object named iconTypes.
  • Rename source to src as dest is already abbreviated and src is more common.
  • callback should just be the last argument in the function call and not in the options object.
  • The first argument of the callback should be an error object. As per node convention.

You will then end up with the following:

favicons({
    src: 'logo.png',
    dest: 'images',
    iconTypes: {
        android: true,
        apple: true,
        coast: true,
        favicons: true,
        firefox: true,
        opengraph: true,
        windows: true
    },
    html: null,
    background: '#1d1d1d',
    tileBlackWhite: false,
    manifest: null,
    trueColor: false,
    url: null,
    logging: false
}, function (err, response, html) {});

Rewrite asynchronously

The port / rewrite of grunt-favicons left a lot of synchronous functionality. This will need to be rewritten.

favicon.ico has a white pixel in the top corner

When I run this source png

favicon

I get this .ico file which has a white pixel in the top left corner of the 16x16 version. None of the other icons have it, just the ico

screen shot 2014-07-16 at 12 45 08 pm

Git hub doesn't let me attach .ico files unfortunately. I can provide a zip file of the files if needed.

iPad apple-touch-startup-startup landscape expects a portrait sized image

Mentioned on http://taylor.fausak.me/2012/03/27/ios-web-app-icons-and-startup-images/

Note that landscape images are not actually defined as such — they’re taller than they are wide. When you’re creating your assets, make them as landscape images. Then, when you’re ready to publish, rotate them 90° clockwise.

This rotation is missing in this script. Now the landscape startup images are not recognized as such and not shown.

Nevermind, I see this should be fixed by RealFaviconGenerator.net

Trying to get Firefox Manifest to work

Getting the following error when I set a path to generate the Firefox manifest... there are no documentation for this part, so I have no clue to work with it...

/Users/xxxxx/Project/node_modules/favicons/index.js:228
                        contentFirefox.icons[size] = name;
                                      ^
TypeError: Cannot read property 'icons' of undefined
    at /Users/xxxxx/Project/node_modules/favicons/index.js:228:39
    at /Users/xxxxx/Project/node_modules/favicons/index.js:71:24
    at /Users/xxxxx/Project/node_modules/favicons/index.js:62:33
    at ChildProcess.exithandler (child_process.js:646:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

Add ES6 -> ES5 build step

This module is written in ES6 (yay!), but is released as ES6 as well, rather than compiling to ES5 first. This is problematic for compat purposes: node 0.12.x, widely used in the wild, doesn't support most of the ES6 syntax used by this module. That means that consuming code must include it's own transpilation step.

A better approach would be to compile this ES6 to ES5 during pre-publish, and use a combination of .gitignore and .npmignore to ensure that the compiled ES5 files aren't committed to the repo, and the source ES6 files aren't shipped with the npm release.

Specify path to imagemagick

On windows, default convert is a tool in the system path C:\Windows\system32\convert.EXE
It is needed to be able to specify the path.
Can you also support graphics magick, this seems not to interfere with any windows default tools.

Don't insert duplicate tags

Note: If you're going to write the HTML metadata to a file, make sure the tags aren't already there or there will be duplicates.

No point in documenting this when you can easily handle it in code. You can detect if the tag already exists and don't insert it.

Having some problems with using this with WSK

I'm just trying to add in the new version of this task into WSK and I'm having a few issues:

At the moment the task is:

gulp.task('favicon', function () {
  favicons({
    files: {
        src: 'app/images/favicons/favicon-1024x1024.png',   // Path for file to produce the favicons. `string` or `object`
        dest: 'dist/',                                      // Path for writing the favicons to. `string`
        html: 'dist/index.html',                            // Path for HTML file to write metadata. `string`
        iconsPath: null,                                    // Path for overriding default icons path. `string`
        androidManifest: 'dist/manifest.json',              // Path for an existing android_chrome_manifest.json. `string`
        browserConfig: null,                                // Path for an existing browserconfig.xml. `string`
        firefoxManifest: 'dist/manifest.webapp',            // Path for an existing manifest.webapp. `string`
        yandexManifest: null                                // Path for an existing yandex-browser-manifest.json. `string`
    },
    icons: {
        android: true,            // Create Android homescreen icon. `boolean`
        appleIcon: true,          // Create Apple touch icons. `boolean`
        appleStartup: true,       // Create Apple startup images. `boolean`
        coast: true,              // Create Opera Coast icon. `boolean`
        favicons: true,           // Create regular favicons. `boolean`
        firefox: true,            // Create Firefox OS icons. `boolean`
        opengraph: true,          // Create Facebook OpenGraph. `boolean`
        windows: true,            // Create Windows 8 tiles. `boolean`
        yandex: true              // Create Yandex browser icon. `boolean`
    },
    settings: {
        appName: 'Web Starter Kit',             // Your application's name. `string`
        appDescription: 'Web Starter Kit',      // Your application's description. `string`
        developer: null,                        // Your (or your developer's) name. `string`
        developerURL: null,                     // Your (or your developer's) URL. `string`
        background: '#3372DF',                  // Background colour for flattened icons. `string`
        index: null,                            // Path for the initial page on the site. `string`
        url: null,                              // URL for your website. `string`
        logging: true                           // Print logs to console?
    }
  });
});

The log for this is minimal:

$ gulp favicon
[14:33:39] Using gulpfile ~/Programming/Code/web-starter-kit/gulpfile.js
[14:33:39] Starting 'favicon'...
[14:33:39] Finished 'favicon' after 538 μs
Created apple-touch-startup-image-320x460.png
Created apple-touch-startup-image-640x920.png
Created apple-touch-startup-image-640x1096.png
Created apple-touch-startup-image-748x1024.png
Created apple-touch-startup-image-768x1004.png
Created apple-touch-startup-image-1496x2048.png
Created apple-touch-startup-image-1536x2008.png

No images seem to get created anywhere (assuming /dist/app-touch-startup-image-*.png would be the location it would be created.

  • Any ideas of how to debug this easier?
  • Any obvious issues where I'm going wrong?
  • Is it possible to give this more than one html file?

Thanks,
Matt

Tag releases

It would be helpful if, when a new version is released, a git tag is created for that version and published to Github as well. It's helpful if you want to go back through old versions of the code based on what older version your own app/consuming library might be on.

Write metadata links in a single file (option html)

It would be nice to have the possibility to write metadata links in a file even if there is no 'head' tag.
In this way, the generated file could be directly included as a partial.

Another solution would be to use glob pattern for the html option to write these metadata links in several files.

Need characters to come across unescaped

Hi!

I've run into an issue with generating a full path to the icons that contains a string like <?php echo ... ?>. Those <> should come across unescaped, but the path written to favicons.php is coming out as &lt;?php echo ... ?&lt;/.

Just to be clear, I'm not expecting it to run the PHP script. It should simply write it exactly as entered into the iconsPath option.

Thanks!
Jen
@germanny

Callback Error

Hi Hayden!

I've got an error in my configuration an I'd like to share it with you. Maybe you have a solution?

The generator works but I keep getting the following error message:

/Users/user/Projects/project/node_modules/favicons/index.js:152
                return callback(metadata);
                       ^
TypeError: undefined is not a function
    at Object.rfg.callback (/Users/user/Projects/project/node_modules/favicons/index.js:152:24)
    at /Users/user/Projects/project/node_modules/favicons/node_modules/real-favicon/index.js:121:57
    at /Users/user/Projects/project/node_modules/favicons/node_modules/real-favicon/index.js:116:28
    at done (/Users/user/Projects/project/node_modules/favicons/node_modules/real-favicon/node_modules/async/lib/async.js:135:19)
    at /Users/user/Projects/project/node_modules/favicons/node_modules/real-favicon/node_modules/async/lib/async.js:32:16
    at /Users/user/Projects/project/node_modules/favicons/node_modules/real-favicon/index.js:113:25
    at /Users/user/Projects/project/node_modules/favicons/node_modules/real-favicon/index.js:32:25
    at /Users/user/Projects/project/node_modules/gulp-replace/node_modules/istextorbinary/node_modules/safefs/node_modules/graceful-fs/graceful-fs.js:104:5
    at Object.oncomplete (fs.js:107:15)

That's my configuration:

gulp.task('favicons', function () {
    favicons({
        files: {
            src:  'src/assets/images/favicon-src.png',
            dest: 'dist/assets/images/favicons',
            html: 'dist/favicons.html'
        },
        icons: {
            android:      true,
            appleIcon:    true,
            appleStartup: true,
            coast:        true,
            favicons:     true,
            firefox:      true,
            opengraph:    true,
            windows:      true,
            yandex:       true
        },
        settings: {
            appName:        'test.com',
            appDescription: 'Personal Website of Name',
            developer:      'Name',
            developerURL:   'http://test.com/',
            version:        0.1,
            background:     '#ffffff',
            index:          'dist/index.html',
            url:            'http://test.com/',
            silhouette:     true,
            logging:        false
        }
    });
});

What am I doing wrong? What can I do?

Switch to unzip2

It appears that the unzip module is abandoned. When using this module, I periodically get invalid signature errors, which appear to originate from the unzip. Looking through the unzip issues shows several other folks with similar issues.

It looks like a fork has fixed at least some of these issues: unzip2. It might be worth switching over.

It looks like it maintains the same API. I would submit a PR with the change, but it looks like you are monkey-patching the unzip stream's .emit() function, so I wanted to check with you first.

Add SVG support

SVG support can be easily implemented if we find a pure-JS Node library that handles SVG to PNG conversion with no external dependencies.

Add El Capitan favicon support

Like #58, to reflect functionality provided by the RFG API, we'd need #53 or a library like potrace that traces rasterised image types to vectors. Pure-JS only, as usual.

<link rel="mask-icon" href="website_icon.svg" color="red">

Error `spawn ENOENT`

Running favicons in my images gulp task outputs the following:

[18:01:04] 'images' errored after 577 ms
[18:01:04] Error: spawn ENOENT
    at errnoException (child_process.js:1011:11)
    at Process.ChildProcess._handle.onexit (child_process.js:802:34)

Any idea why that's happening?

Favicons 4

This is a complete rewrite of Favicons to suit the pressing needs of users and fix a lot of bugs. I think I've lost track of the original use case for Favicons over time: "I want to generate a complete suite of favicons and valid HTML with the smallest amount of work possible". Let's create a discussion of what should be in the new version:

  • Generate favicons locally (#48, #44)
  • Generate files locally
  • Make online (RFG) generation optional, sort out RFG API integration issues (zlib error #45, unzip issue #47, custom overwrites #49, 400 errors #36, better API object #37. See rfg-api for code)
  • Select image processor: ImageMagick, GM, Sharp, JIMP, Pica
  • Simplify the configuration
  • Stop writing files, just return HTML and Images into a buffer and let users sort it out (see: #46)
  • Consistent (object) error handling
  • Create website (http://favicons.io/)
  • Solve WSK issues (google/web-starter-kit#470, google/web-starter-kit#599):
    • At the moment, Chrome Stable, iOS and Windows Phone have issues.
    • We can only use it with one html file at a time (gulp-favicons)
    • Supporting serve and serve:dist requires the use of .tmp for html files.
    • Requires imagemagik and graphicsmagik from brew
  • Solve openjck's issue (openjck/openjck.com#1)
  • Collaborate with dependents (svg2favicons, enb-favicons, broccoli-favicon, favidenticon)
  • Add SVG support i.e. adaptdk/svg2favicons#1 (no pure-js svg-to-png Node.js module available, also applies to that new El Capitan SVG thing...)
  • Better logging feature
  • Create a Grunt version (naming conflict: https://github.com/gleero/grunt-favicons) (Gleero won't respond)
  • Consistent Readme / Website documentation

If you'd like to collaborate physically, check out the favicons-4 branch.

Missing files

Originally opened by @vn38minhtran

  • Missing apple-touch-startup-image-1024x748.png
  • Missing apple-touch-startup-image-2048x1496.png

Custom overwrites not working

The "Custom Overwrites" example from the readme isn't working. In getConfig, params/options are being merged into config selectively, allowing not all, but only a handful of favicon_generation settings to be overwritten.

Add upscaling option

Basically if the source image is smaller than one of the specified sizes then skip that resize.

Make sure correct metadata is in

  • meta(name='apple-mobile-web-app-capable', content='yes')
  • meta(name='apple-mobile-web-app-status-bar-style', content='black-translucent')
  • meta(name='format-detection', content='telephone=yes')
  • meta(name='mobile-web-app-capable', content='yes')
  • meta(property='twitter:image', content='')

Callback option

A callback option should be accepted to allow gulp integration

gulp.task('favicon', function(callback) {
    favicon({
      ...
      callback: callback
    });
});

Document support for multiple sizes?

You thank some people in the readme for their input on multiple sizes. Has this actually made it into the production system? If so, could you document support for it?

Local generation of favicons

Just browsing thru the issues and there's mentions of ImageMagick, gm but I don't see anywhere in the source where it supports generating images locally? Is this purely reliant on generating thru RealFaviconGenerator service? Would be nice to support generating the different sizes locally....

Transferred repos

@jessaustin Sorry to be a pain, but we were in the middle of phasing out rfg-api and real-favicon repositories to keep things simple. This means your PR is gone, but it can quickly be rewritten for this repo - same code more or less. Sorry about that!

Cannot install v2.x

https://github.com/RealFaviconGenerator/real-favicon has been deleted, which preventing 2.x from being installed. See:

❯ npm i favicons@2    
npm ERR! git clone --template=/Users/tom/.npm/_git-remotes/_templates --mirror git://github.com/RealFaviconGenerator/real-favicon.git /Users/tom/.npm/_git-remotes/git-github-com-RealFaviconGenerator-real-favicon-git-94309738: Cloning into bare repository '/Users/tom/.npm/_git-remotes/git-github-com-RealFaviconGenerator-real-favicon-git-94309738'...
npm ERR! git clone --template=/Users/tom/.npm/_git-remotes/_templates --mirror git://github.com/RealFaviconGenerator/real-favicon.git /Users/tom/.npm/_git-remotes/git-github-com-RealFaviconGenerator-real-favicon-git-94309738: fatal: remote error: 
npm ERR! git clone --template=/Users/tom/.npm/_git-remotes/_templates --mirror git://github.com/RealFaviconGenerator/real-favicon.git /Users/tom/.npm/_git-remotes/git-github-com-RealFaviconGenerator-real-favicon-git-94309738:   Repository not found.
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "favicons@2"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code 128

npm ERR! Command failed: git clone --template=/Users/tom/.npm/_git-remotes/_templates --mirror git://github.com/RealFaviconGenerator/real-favicon.git /Users/tom/.npm/_git-remotes/git-github-com-RealFaviconGenerator-real-favicon-git-94309738
npm ERR! Cloning into bare repository '/Users/tom/.npm/_git-remotes/git-github-com-RealFaviconGenerator-real-favicon-git-94309738'...
npm ERR! fatal: remote error: 
npm ERR!   Repository not found.
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

(I'd like to try v2.x as we cannot rely on a web service (#44)).

Publish Gulp plugin as a separate repository

In the Node ecosystem, the majority of build system plugins are hosted in their own separate repositories. This makes it easier to discover them (We've had some trouble going back and forth between the module and Gulp file given branching strategies).

Would you consider pushing the Gulp plugin to a gulp-favicons repo?

Legacy issues

Originally opened by @gauntface:

  • On Chrome stable, because there is no there is no icon supplied. The manifest is only picked up in Chrome Beta.
  • Also had some issues with iOS 8 (the app icon and start up screen weren't getting used)

(Not sure if these still apply).

Zlib error

Hi,
I've a strange issue while running gulp tasks on the CI(Linux machine). It continues to break up in the middle exactly at the favicon generation task. Follows, the error message,


events.js:85 
     throw er; // Unhandled 'error' event
Error: invalid distance too far back
    at Zlib._handle.onerror (zlib.js:366:17)

Seems some problem with Zlib module(http://stackoverflow.com/questions/27039415/error-when-using-zlibinflate-invalid-distance-too-far-back).

Though, I never get such error at my dev(windows machine) environment. Any ideas?

By the way, thanks for the excellent favicon npm module. Its very helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.