https://github.com/myshov/gulp-gitflow-diff
Gulp plugin for the filtering of files that differ from some base git branch
https://github.com/myshov/gulp-gitflow-diff
git-flow gulp-plugins
Last synced: 8 months ago
JSON representation
Gulp plugin for the filtering of files that differ from some base git branch
- Host: GitHub
- URL: https://github.com/myshov/gulp-gitflow-diff
- Owner: myshov
- License: mit
- Created: 2016-03-20T15:57:07.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-01-16T10:07:15.000Z (about 7 years ago)
- Last Synced: 2025-06-09T18:12:52.857Z (9 months ago)
- Topics: git-flow, gulp-plugins
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gulp-gitflow-diff [](https://travis-ci.org/myshov/gulp-gitflow-diff)
Gulp plugin for fitlering files that differ from some base git branch
This plugin is useful when you have a pretty large project with adopted git-flow/github-flow organization of development process. And for example you want to lint files on git push hook. Why do you have to lint every single file when only several of them actually have been changed? This plugin will help to filter only those files that actually have been changed relatively of base branch (usually `master` or `origin/master`).
# Installation
```sh
$ npm install gulp-gitflow-diff --save-dev
```
# Usage
## Basic example
```js
var gulp = require('gulp');
var gulpGitflowDiff = require('gulp-gitflow-diff');
gulp.task('default', function () {
return gulp.src('./src/**/*.js')
.pipe(gulpGitflowDiff({baseBranch: 'master'}))
.pipe(gulp.dest('dest'));
});
```
## Linting example
```js
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var gulpGitflowDiff = require('gulp-gitflow-diff');
gulp.task('lint', function () {
return gulp.src('./src/**/*.js')
.pipe(gulpGitflowDiff({baseBranch: 'master'}))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
```
# NPM
https://www.npmjs.com/package/gulp-gitflow-diff
# License
MIT