generator-webapp
generator-webapp copied to clipboard
images problem after renaming or moving
Hello, Thanks for your work. I had a problem when I was moving images or copying them. It was not being copied, or it was copied with its old name. It quite bored me. The problem comes from the cache. It was fixex fallowinf this post : http://stackoverflow.com/questions/21532903/strange-images-issue-with-gulp-js using gulp-newer :
npm install gulp-newer --save-dev
and int gulpfile:
gulp.task('images', () => {
return gulp.src('app/images/**/*')
.pipe($.newer('dist/images'))
.pipe($.imagemin({
progressive: true,
interlaced: true,
// don't remove IDs from SVGs, they are often used
// as hooks for embedding and styling
svgoPlugins: [{cleanupIDs: false}]
}))
.pipe(gulp.dest('dist/images'));
});