Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created September 20, 2018 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandiez/9aef9468727b437f1e23f71fb8a5d489 to your computer and use it in GitHub Desktop.
Save fernandiez/9aef9468727b437f1e23f71fb8a5d489 to your computer and use it in GitHub Desktop.
Optimización de imágenes Gulp
// 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