我是一个特拉维斯-CI构建咕噜-的contrib-imagemin任务期间遇到一个错误就绪财产“内容” ......特拉维斯-CI构建失败(不能未定义
Warning: Running "imagemin:dist" (imagemin) task
Fatal error: Cannot read property 'contents' of undefined
繁重的构建成功作品在我的本地机器上,但是当通过特拉维斯慈
Gruntfile.js执行失败
imagemin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.app %>/images',
src: '{,*/}*.{png,jpg,jpeg,gif}',
dest: '<%= yeoman.dist %>/images'
}]
}
},
本地咕噜生成(输出)
Running "imagemin:dist" (imagemin) task
Minified 9 images (saved 77.32 kB)
Done, without errors.
Execution Time (2016-01-13 17:04:49 UTC)
imagemin:dist 1.6s 100%
Total 1.6s
特拉维斯CI咕噜版本(输出)
Warning: Running "imagemin:dist" (imagemin) task
Fatal error: Cannot read property 'contents' of undefined
Execution Time (2016-01-13 17:00:32 UTC)
loading tasks 9ms 2%
imagemin:dist 441ms 98%
Total 450ms Use --force to continue.
Aborted due to warnings.
我试图确定是否有在我如何在声明SRC语法问题任务...但是,不会出现这样的情况......我可以成功地使用一些不同的语法风格在本地完成生成没有错误,包括咕噜咕噜为-的contrib-imagemin提供的示例
编号:https://github.com/gruntjs/grunt-contrib-imagemin
dynamic: { // Another target
files: [{
expand: true, // Enable dynamic expansion
cwd: 'src/', // Src matches are relative to this path
src: ['**/*.{png,jpg,gif}'], // Actual patterns to match
dest: 'dist/' // Destination path prefix
}]
任何想法或建议?