Skip to content

Instantly share code, notes, and snippets.

@Undistraction
Last active August 29, 2015 14:08
Show Gist options
  • Save Undistraction/d198436f2fb9f7e9fbae to your computer and use it in GitHub Desktop.
Save Undistraction/d198436f2fb9f7e9fbae to your computer and use it in GitHub Desktop.
var changed = require('gulp-changed');
var gulp = require('gulp');
var imagemin = require('gulp-imagemin');
var cache = require('gulp-cache');
gulp.task('images', function () {
var dest = './dist/images';
return gulp.src('./src/images/**')
.pipe(changed(dest)) // Ignore unchanged files
// .pipe(cache(imagemin({
// progressive: true,
// interlaced: true
// }))) // Optimize
.pipe(gulp.dest(dest));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment