0.1.1 • Published 9 years ago
detect-conflicts v0.1.1
detect-conflicts
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.