我已经使用Grunt很长一段时间了,但这是第一次遇到这种情况。由于某种奇怪的原因,我无法让新的npm工具正常运行。我运行了
Grunt任务:
控制台输出:
npm install grunt-favicons --save-dev
,它也能正常工作,我已经安装了ImageMagick等必要工具。我已经正确设置了路径和参数,并且已经执行了Grunt,而且似乎也没有出现任何问题。但是却没有生成文件。我已经检查了文件夹权限和一切相关内容。我只是好奇是否有聪明的人知道该怎么做。Grunt任务:
favicons: {
options: {
trueColor: true,
precomposed: false,
coast: true,
windowsTile: true,
tileBlackWhite: true,
},
files: {
src: ['<%= config.src %>/img/favicon.png'],
dest: '<%= config.dest %>/img/icons/'
}
},
控制台输出:
$ grunt favicons
Running "favicons:files" (favicons) task
>> Created output folder at " public/assets/img/icons/ "
Resizing images for "app/assets/img/favicon.png"... OK
favicon.ico... OK
favicon.png... OK
apple-touch-icon.png... OK
apple-touch-icon-60x60-precomposed.png... OK
apple-touch-icon-72x72.png... OK
apple-touch-icon-76x76-precomposed.png... OK
apple-touch-icon-114x114.png... OK
apple-touch-icon-120x120-precomposed.png... OK
apple-touch-icon-144x144.png... OK
apple-touch-icon-152x152-precomposed.png... OK
coast-icon-228x228.png... OK
windows-tile-144x144.png... OK