https://github.com/creativelive/gulp-diff
gulp plugin for diffing files
https://github.com/creativelive/gulp-diff
Last synced: 11 months ago
JSON representation
gulp plugin for diffing files
- Host: GitHub
- URL: https://github.com/creativelive/gulp-diff
- Owner: creativelive
- License: other
- Created: 2014-05-21T00:23:20.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2021-01-19T16:15:26.000Z (over 5 years ago)
- Last Synced: 2025-05-12T20:54:09.265Z (about 1 year ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 7
- Watchers: 13
- Forks: 10
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-diff [](https://travis-ci.org/creativelive/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
```javascript
'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 }));
});
```