grunt-favicon
![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)
![Npm Downloads](https://nodei.co/npm-dl/grunt-favicon.png?height=3&months=3)
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
Count of images into icon.
options.colorDepth
Count of bits for color.
Example
grunt.initConfig({
favicon: {
options: {
countOfImages: 3,
colorDepth: 8
},
tasks: {
options: {
},
files: [{
expand : true,
cwd : "src",
ext : ".ico",
dest : "dest",
src : "*.png"
}]
}
}
});