Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
base-fs-conflicts
Advanced tools
Readme
Detect potential file system conflicts and if necessary prompt the user before overwriting files.
Install with npm:
$ npm install --save base-fs-conflicts
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('base-fs-conflicts');
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:
file.contents
on the vinyl fileParams
dest
{String}: The same desination directory passed to app.dest()
returns
{String}Example
app.src('foo/*.js')
.pipe(app.conflicts('foo'))
.pipe(app.dest('foo'));
You might also be interested in these projects:
This document was generated by verb-readme-generator (a verb generator), please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. Or visit the verb-readme-generator project to submit bug reports or pull requests for the readme layout template.
Generate readme and API documentation with verb:
$ npm install -g verb verb-readme-generator && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on July 26, 2016.
FAQs
Detect potential file system conflicts and if necessary prompt the user before overwriting files.
The npm package base-fs-conflicts receives a total of 2,131 weekly downloads. As such, base-fs-conflicts popularity was classified as popular.
We found that base-fs-conflicts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.