Package Exports
- gulp-newer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-newer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-newer
A gulp plugin for passing through only those source files that are newer than corresponding destination files.
Install
npm install gulp-newer --save-devUse
var gulp = require('gulp');
var newer = require('gulp-newer');
var imagemin = require('gulp-imagemin');
var imgSrc = 'src/img/**';
var imgDest = 'build/img';
// Minify any new images
gulp.task('images', function() {
return gulp.src(imgSrc)
// only pass through newer images
.pipe(newer(dest))
.pipe(imagemin())
.pipe(gulp.dest(dest));
});
gulp.task('default', function() {
gulp.watch(imgSrc, function() {
gulp.run('images');
});
});