# gulp-conflict

> Check if files in stream conflict with those in target dir, with option to use new, keep old, show diff, etc.

Latest version **0.4.0** (published 2015-04-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-conflict
pnpm add gulp-conflict
yarn add gulp-conflict
bun add gulp-conflict
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2015-04-26 |
| First published | 2014-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Joakim Carlstein |
| Maintainers | joakimbeng |
| Keywords | gulpplugin, yeoman, slush, dest, confirm, ask, conflict |

## Links

- npm: https://www.npmjs.com/package/gulp-conflict
- Repository: https://github.com/slushjs/gulp-conflict
- Issues: https://github.com/slushjs/gulp-conflict/issues
- npm.io page: https://npm.io/package/gulp-conflict

## Dependencies (4)

- [diff](https://npm.io/package/diff.md) ^1.0.8
- [inquirer](https://npm.io/package/inquirer.md) ~0.8.0
- [through2](https://npm.io/package/through2.md) ~0.6.3
- [gulp-util](https://npm.io/package/gulp-util.md) ~3.0.1

## Recent versions

- 0.4.0 (latest) — 2015-04-26
- 0.3.0 — 2014-11-13
- 0.2.0 — 2014-07-29
- 0.1.2 — 2014-06-01
- 0.1.1 — 2014-03-24
- 0.1.0 — 2014-03-23

## README

# gulp-conflict [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]

> Check if files in stream conflict with those in target dir, with option to use new, keep old, show diff, etc.

## Primary objective

Used before any `gulp.dest` step when using [`slush`](https://www.npmjs.org/package/slush) as a Yeoman replacement.

## Installation

### For global use with slush

Install `gulp-conflict` as a dependency:

```shell
npm install --save gulp-conflict
```

### For local use with gulp

Install `gulp-conflict` as a development dependency:

```shell
npm install --save-dev gulp-conflict
```

## Usage

### In your `slushfile.js`:

```javascript
var conflict = require("gulp-conflict");

gulp.src(__dirname + '/templates/**')
  .pipe(conflict('./'))
  .pipe(gulp.dest('./'));
```

### In your `gulpfile.js`:

```javascript
var install = require("gulp-conflict");

gulp.src(['./files/*.js'])
  .pipe(conflict('./dir'))
  .pipe(gulp.dest('./dir'));
```

## API

### conflict(dest, options)

#### dest

Type: `String`, *required*

Specify destination directory to compare files in, should be the same as destination directory for `gulp.dest`.

#### options

Type: `Object`, *optional*

**options.cwd** - specify another working directory than `process.cwd()`

**options.defaultChoice** - default choice on conflicts e.g. `'y'` (replace, default), `'n'` (skip), `'d'` (diff)

## License

[MIT License](http://en.wikipedia.org/wiki/MIT_License)

[npm-url]: https://npmjs.org/package/gulp-conflict
[npm-image]: https://badge.fury.io/js/gulp-conflict.png

[travis-url]: http://travis-ci.org/slushjs/gulp-conflict
[travis-image]: https://secure.travis-ci.org/slushjs/gulp-conflict.png?branch=master

[depstat-url]: https://david-dm.org/slushjs/gulp-conflict
[depstat-image]: https://david-dm.org/slushjs/gulp-conflict.png

---
_Source: https://npm.io/package/gulp-conflict · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
