Open dr-potato opened 10 years ago
You will need these deps for lots of npm modules to work - you only have to install them once.
Thanks for the reply. Hope my original message wasn't too bitchy, I didn't mean it to be.
You will need these deps for lots of npm modules to work - you only have to install them once.
Ok, if it can't be done any other way, then so be it. It's just that I haven't had to install these dependencies once (and I'm using about 20 plugins and a couple of other npm packages now) and that I haven't been able to get the dependencies to install right (despite dedicating a whole day to it). I'm sure it's possible and maybe even neccessary, but it is a painful process. So if there is any way to make the plugin work without these dependencies I would highly recommend it, it would make using your plugin an order of magnitude easier.
Well, I am not the maintainer of the repo - you should discuss it with @gleero
I've had the same issue. For me the solution was to install grunt-shell
and imagemagick. After that you can use (for example):
shell: {
favicon: {
command: [
'convert src/favicon.png ( -clone 0 -resize 16x16 ) ( -clone 0 -resize 32x32 ) ( -clone 0 -resize 48x48 ) -delete 0 build/favicon.ico',
'convert src/favicon.png -resize 70x70 build/tile-70x70.png',
'convert src/favicon.png -resize 150x150 build/tile-150x150.png',
'convert src/favicon.png -resize 310x310 build/tile-310x310.png',
'convert src/favicon.png -resize 150x150 -background none -gravity center -extent 310x150 build/tile-wide.png',
'convert src/favicon.png -resize 57x57 build/apple-touch-icon.png',
'convert src/favicon.png -resize 60x60 build/apple-touch-icon-60x60.png',
'convert src/favicon.png -resize 72x72 build/apple-touch-icon-72x72.png',
'convert src/favicon.png -resize 76x76 build/apple-touch-icon-76x76.png',
'convert src/favicon.png -resize 114x114 build/apple-touch-icon-114x114.png',
'convert src/favicon.png -resize 120x120 build/apple-touch-icon-120x120.png',
'convert src/favicon.png -resize 144x144 build/apple-touch-icon-144x144.png',
'convert src/favicon.png -resize 152x152 build/apple-touch-icon-152x152.png',
'convert src/favicon.png -resize 64x64 build/favicon.png'
].join('&&')
}
}
Which works perfectly (and generates all the recommended icons, with optional transparency). You can add/remove icon sizes and change the source and destination as you please.
I agree with @dr-potato. Using the plugin is very bureaucratic in Windows, if there was a simpler way would be ideal. We know that the installation is done once, but imagine a team having to do these procedures on each machine to ensure the functioning of the build of a project. The purpose of Grunt is make things easier.
I ended up doing what @ismay implemented using grunt-shell. Hopefully, there will be an easier way in the future.
This might be a node problem, but there are a lot of dependencies that need to be installed for this plugin to work on windows (32 bit). Imagemagick is listed in the readme, but what's also needed with windows is:
I've tried meeting all the dependencies, but after downloading and installing a couple of ~600MB iso's (and I wasn't even done) I figured that this it wasn't worth the effort.
I've never had this problem before with any other grunt plugin. If there is a way for grunt-favicons to cut down on the windows dependencies it would be a tremendous improvement. Because after all, it is a relatively minor task, and I don't want to have to this much configuring, downloading and researching just for generating some favicons.
Not that this isn't a wonderful plugin, but it's just a very, very frustrating experience getting this to work on windows.