Some of the logic in this plugin, in particular lib/diffs.js, is based on the conflicter code in [yeoman-generator][], Copyright (c) 2015, Google, licensed under BSD-2-Clause.
The following code should work with any [base][] application, including [verb][], [assemble][], and [generate][].
var path = require('path');
var Base = require('base');
var fs = require('base-fs');
var conflicts = require('{%= name %}');
var base = new Base();
// register the `conflicts` and `fs` plugins
base.use(conflicts());
base.use(fs());
// pass the same `dest` to both `.dest()` and `.conflicts()`
var dest = 'fixtures/dist';
base.src('fixtures/*.txt')
.pipe(base.conflicts(dest)) // adds a `.conflicts()` method
.pipe(base.dest(dest));
Example
If a file conflict is detected, you'll see something like this in the terminal:
{%= apidocs("index.js") %}