Only pass through changed files
JavaScript
Switch branches/tags
Nothing to show
Pull request Compare This branch is 56 commits behind sindresorhus:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
index.js
package.json
readme.md
test.js

readme.md

gulp-changed Build Status

Only pass through changed files

No more wasting precious time on processing unchanged files.

Install

Install with npm

npm install --save-dev gulp-changed

Example

var gulp = require('gulp');
var changed = require('gulp-changed');
var ngmin = require('gulp-ngmin'); // just as an example

var SRC = 'src/*.js';
var DEST = 'dist';

gulp.task('default', function () {
	gulp.src(SRC)
		.pipe(changed(DEST))
		// ngmin will only get the files that
		// changed since the last time it was run
		.pipe(ngmin())
		.pipe(gulp.dest(DEST));
});

API

changed(dest)

dest

Type: String

The destination directory. Same as you put into gulp.dest().

This is needed to be able to compare the current files with the destination files.

License

MIT © Sindre Sorhus