Socket
Socket
Sign inDemoInstall

gulp-newer

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-newer

Only pass through newer source files


Version published
Weekly downloads
32K
increased by8.99%
Maintainers
1
Weekly downloads
 
Created
Source

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-dev

Use

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');
  });

});

Keywords

FAQs

Package last updated on 16 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc