gently-copy
Copy files without overwriting
Last updated a year ago by dmitriz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gently-copy 
SYNC missed versions from official npm registry.

gently-copy

Safely, colorfully and informatively copy files without overwriting

npm version Build Status Dependency Status

PRs Welcome MIT License npm downloads

js-standard-style

Why?

  • Copying files is sensitive operation with possible side-effects.
  • Standard utilities do not sufficiently inform the user about what is going on.

Features

  • Safely copy files and directories without overwriting.
  • Skip overwriting existing files, inform instead (or configure to overwrite instead with option = {overwrite: true}.
  • Create new directories if needed.
  • Clearly and colorfully inform about all actions peformed.

Install

$ npm install --save gently-copy

Usage

var gentlyCopy = require('gently-copy')

var fileList = ['some-file', 'some-dir']
var dest = 'some-dest'

gentlyCopy(fileList, dest) // no overwriting (default)
gentlyCopy(fileList, dest, {overwrite: true}) // force overwriting

Console output with colors, thanks to the wonderful chalk:

= Begin copying files
 - Copying file or directory: some-file
 - Copying file or directory: some-dir
= End copying files

API

gentlyCopy (source, destination, options)

source

Type: string or (array of strings)

Single or list of file and directory name(s).

destination

Type: string

Destination directory name.

options (optional)

Type: object

To overwrite existing files, pass option = {overwrite: true}

License

MIT © Dmitri Zaitsev

Current Tags

  • 3.2.0                                ...           latest (a year ago)

30 Versions

  • 3.2.0                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.3.1                                ...           4 years ago
  • 2.2.1                                ...           4 years ago
  • 2.1.2                                ...           4 years ago
  • 2.1.1                                ...           4 years ago
  • 2.0.5                                ...           4 years ago
  • 2.0.4                                ...           4 years ago
  • 2.0.3                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 1.2.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.1.6                                ...           4 years ago
  • 1.1.5                                ...           5 years ago
  • 1.1.4                                ...           5 years ago
  • 1.1.3                                ...           5 years ago
  • 1.1.2                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
  • 0.0.0                                ...           5 years ago

Copyright 2014 - 2016 © taobao.org |