1. gulp-diff
Show diffs for files in the stream against those in a target directory
gulp-diff
Package: gulp-diff
Created by: creativelive
Last modified: Sat, 18 Jun 2022 16:57:18 GMT
Version: 1.0.0
License: MIT
Downloads: 7,840
Repository: https://github.com/creativelive/gulp-diff

Install

npm install gulp-diff
yarn add gulp-diff

gulp-diff

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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin