我有个Gruntfile像:
grunt.initConfig({
imagemin: {
dynamic: {
files: [
src: ['lib/public/img/*.{png,jpg,jpeg,gif}'],
dst: 'build/public/img/',
expand: true,
flatten: true
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-newer');当我执行grunt newer:imagemin时,它会记录以下内容:
Running "newer:imagemin" (newer) task
Running "newer:imagemin:dynamic" (newer) task
Running "imagemin:dynamic" (imagemin) task
Minified 192 images (saved 1.3 MB)
Running "newer-postrun:imagemin:dynamic:1:/home/goferito/versus/node_modules/grunt-newer/.cache" (newer-postrun) task第一次有意义,但第二次我运行它,就在不久之后,它不应该削弱任何新的东西。但它再次缩小了192张图像。
我已经检查过了,grunt-更新正在将时间戳保存在它的/node_modules/grunt-newer/.cache/imagemin/dynamic/timestamp中
版本:
"grunt-contrib-imagemin": "^1.0.0",
"grunt-newer": "^1.1.1"有人知道从哪开始找吗?
发布于 2016-07-21 15:41:36
使用grunt-contrib-imagemin v1.0.1和grunt-较新的v0.8.0解决了它。
https://stackoverflow.com/questions/34056946
复制相似问题