有人可以帮我解释一下这是做什么的。咕噜声过程会产生错误。我需要找出原因。 “src”做了什么?
imagemin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.client %>/assets/images',
src: '{,*/}*.{png,jpg,jpeg,gif}',
dest: '<%= yeoman.dist %>/public/assets/images'
}]
}
},
/////编辑/////实际输出
运行“svgmin:dist”(svgmin)任务 总节省:0 B
Done, without errors.
Execution Time (2014-07-12 09:39:26 UTC)
loading tasks 78ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 59%
svgmin:dist 54ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 41%
Total 132ms
Warning: Running "imagemin:dist" (imagemin) task
Warning: Command failed: Use --force to continue.
Aborted due to warnings.
Execution Time (2014-07-12 09:39:26 UTC)
loading tasks 188ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 62%
imagemin:dist 113ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 37%
Total 302ms Use --force to continue.
Aborted due to warnings.
/////编辑2 ////// 使用命令“grunt imagemin --verbose --force”,我收到以下错误:
Files: client/assets/images/timeline/jd_small.png -> dist/public/assets/images/timeline/jd_small.png
Options: interlaced, optimizationLevel=3, progressive
Warning: Command failed: Used --force, continuing.
Fatal error: Cannot read property 'contents' of undefined
不确定那告诉我的是什么。
答案 0 :(得分:1)
好吧事实证明,如果图像损坏,grunt会抛出错误。我在Photoshop中打开它保存它并且咕噜咕噜地工作了。
如果grunt能够输出类似的错误,那会很酷吗。