Created
September 20, 2018 00:16
-
-
Save fernandiez/9aef9468727b437f1e23f71fb8a5d489 to your computer and use it in GitHub Desktop.
Optimización de imágenes Gulp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// image settings | |
const images = { | |
src : dir.src + 'images/**/*', | |
build : dir.build + 'images/' | |
}; | |
// image processing | |
gulp.task('images', () => { | |
return gulp.src(images.src) | |
.pipe(newer(images.build)) | |
.pipe(imagemin()) | |
.pipe(gulp.dest(images.build)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment