cpy-cli

5.0.0 • Public • Published

cpy-cli

Copy files

Why

  • Fast by using streams.
  • Resilient by using graceful-fs.
  • User-friendly by accepting globs and creating non-existant destination directories.
  • User-friendly error messages.

Install

npm install --global cpy-cli

Usage

$ cpy --help

  Usage
    $ cpy <source …> <destination>

  Options
    --no-overwrite       Don't overwrite the destination
    --cwd=<dir>          Working directory for files
    --rename=<filename>  Rename all <source> filenames to <filename>. Supports string templates.
    --dot                Allow patterns to match entries that begin with a period (.)
    --flat               Flatten directory structure. All copied files will be put in the same directory.
    --concurrency        Number of files being copied concurrently

  <source> can contain globs if quoted

  Examples
    Copy all .png files in src folder into dist except src/goat.png
    $ cpy 'src/*.png' '!src/goat.png' dist

    Copy all files inside src folder into dist and preserve path structure
    $ cpy . '../dist/' --cwd=src

    Copy all .png files in the src folder to dist and prefix the image filenames
    $ cpy 'src/*.png' dist --cwd=src --rename=hi-{{basename}}

Related

  • cpy - API for this module

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 5.0.0
    85,133
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 5.0.0
    85,133
  • 4.2.0
    49,794
  • 4.1.0
    7,424
  • 4.0.0
    6,430
  • 3.1.1
    36,734
  • 3.1.0
    1,140
  • 3.0.0
    992
  • 2.0.0
    6,349
  • 1.0.1
    29,020
  • 1.0.0
    72

Package Sidebar

Install

npm i cpy-cli

Weekly Downloads

223,088

Version

5.0.0

License

MIT

Unpacked Size

5.76 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus