Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

jonschlinkert/detect-conflicts

Repository files navigation

detect-conflicts NPM version

Check for conflicts, and get prompted for action (when needed), before writing a file to disk.

Some of this code is based on the conflicter in yeoman-generator and the visual diff method in verb.

Install

Install with npm

$ npm i detect-conflicts --save

Usage

var detect = require('detect-conflicts');

var file = {path: 'fixtures/a.txt', contents: 'aaa'};
detect(file, function (res) {
  // `res` would be a user response. we'll only get to this
  // point if the user chooses not to abort. 
});

Related projects

  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more
  • snippet: CLI and API for easily creating, reusing, sharing and generating snippets of code from the… more
  • template: Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… more
  • yeoman-generator: Rails-inspired generator system that provides scaffolding for your apps

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert BSD license Copyright (c) Google Released under the MIT license.


This file was generated by verb-cli on August 19, 2015.

About

Renamed to jonschlinkert/conflicts, please use that instead.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages