Skip to content

arlogilbert/gulp-diff

 
 

Repository files navigation

gulp-diff-4

Gulp-diff migrated to support Gulp 4.x task to diff files in the stream against a destination.

Usage

An example jsbeautify verification task to show diffs from js-beautify

'use strict';

var gulp = require('gulp');
var prettify = require('gulp-jsbeautifier');
var diff = require('gulp-diff');

gulp.task('js-beautify', function() {
  return gulp.src([
      '!node_modules/**/*.js',
      '**/*.js'
    ])
    .pipe(prettify({
      config: '.jsbeautifyrc',
      mode: 'VERIFY_AND_WRITE'
    }))
    .pipe(diff(/* 'target directory to diff against', defaults to diff against original source file */))
    // emit an error on finding diffs
    .pipe(diff.reporter({ fail: true }));
});

About

gulp plugin for diffing files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%