npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

grunt-favicon

1.0.8 • Public • Published

grunt-favicon NPM version Built with Grunt

Npm Downloads Npm Downloads

Generate site favicons via ImageMagick.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-favicon --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of javascript:

grunt.loadNpmTasks("grunt-favicon");

WARNING: This extension require global install ImageMagick.

  • For Windows go to the ImageMagick and download installer.
  • For Debian, Ubuntu or Mint run on command line: sudo apt-get install imagemagick
  • For Redhut, Centos or Fedora run on command line: sudo yum install ImageMagick
  • For Gentoo run on command line: sudo emerge media-gfx/imagemagick
  • For MacOS run on command line: sudo port install ImageMagick

Options

options.countOfImages

  • type <number>
  • default 6

Count of images into icon.

options.colorDepth

  • type <number>
  • default 8

Count of bits for color.

Example

grunt.initConfig({
    favicon: {
        options: {
            // Icons contains 3 images
            // (16x16, 32x32, 48x48)
            countOfImages: 3,
            // for 256 colors, is max value
            colorDepth: 8
        },
        tasks: {
            options: {
                // override options if needed
            },
            files: [{
                expand : true,
                cwd    : "src",
                ext    : ".ico",
                dest   : "dest",
                src    : "*.png"
            }]
        }
    }
});

Keywords

install

npm i grunt-favicon

Downloadsweekly downloads

33

version

1.0.8

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability