2.0.0 • Published 4 years ago

gulp-if-any-newer v2.0.0

Weekly downloads
3
License
MIT
Repository
-
Last release
4 years ago

gulp-if-any-newer

Pass through all source files if any source file is newer than any dest file.

Usage

const gulp = require('gulp');
const ifAnyNewer = require('gulp-if-any-newer');
const anyConsumer = require('gulp-any-consumer');

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

gulp.task('default', () =>
  gulp.src(SRC)
    .pipe(ifAnyNewer(DEST, { filter: '**/*', debug: true }))
    // anyConsumer will only get the files feeded in
    // if any source file is newer than any file in dest
    .pipe(anyConsumer())
    .pipe(gulp.dest(DEST));
);

Related Gulp Plugins

Contributing

Thanks to all contributors! This is open source, Pull Requests are welcome!

License

Copyright (c) 2017-2020 by Cornelius Buschka

MIT License