1.json文件
{
“SecurityPlatform.jpg”: “SecurityPlatform-330213dab9.jpg”,
“activitie1.jpg”: “activitie1-71f076339e.jpg”,
“activitie2.jpg”: “activitie2-10e484b5dc.jpg”,
“activitie3.jpg”: “activitie3-b586b0488a.jpg”,
“activitie4.jpg”: “activitie4-4721d2cc81.jpg”,
“activitie5.jpg”: “activitie5-9648d629fe.jpg”,
“activitie6.jpg”: “activitie6-0fa6fd0b85.jpg”,
“answer.jpg”: “answer-a99d47d726.jpg”,
“apology.jpg”: “apology-555cab6e99.jpg”,
“app/app-martial-invitation-bg-20170626.jpg”: “app/app-martial-invitation-bg-20170626-aed02cd4a6.jpg”
}
2、文件名包含8位纯数字连续的名字,则替换不成功,原因则在最后一个文件
gulp.task(‘rev’,[‘revImg’], function () {
gulp.src([‘dist/rev/rev-images-manifest.json’, ‘dist/WelfareActivities.html’])
.pipe(revCollector({
replaceReved: true
}))
.pipe(gulp.dest(buildBasePath));
});
3、修改文件名,避免连续的纯数字超过7位,是短名字就OK啦