JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q16174F
  • License ISC

Copies files from a source directory or a glob pattern to another folder and provides progress updates on command line or with progress events. Can be run as cli or with an api.

Package Exports

  • copy-progress
  • copy-progress/dist/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (copy-progress) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

copy-progress

CLI Usage

Installation

npm install -g copy-progress

Npm 6

If you are using npm version 6 you will also have to install a peer dependency:

npm install -g rxjs@6

It is recommend to update to Npm 7:

npm install -g npm@7

Usage

copy-progress -o mySourceFolder -o myDestinationFolder

Copy Example

Glob

Glob patterns can be used to filter files within the source directory:

copy-progress -o mySourceFolder -o myDestinationFolder -g /**/package.json

ETA

ETA can be displayed with -e or --eta. This is best used for copying larger files:

copy-progress -o mySourceFolder -o myDestinationFolder -e

Bars

By default a file count and a bytes progress bar can be displayed. This can be changed with the --bar or -b argument using either files or bytes:

copy-progress -o mySourceFolder -o myDestinationFolder -b files

Copy Example

copy-progress -o mySourceFolder -o myDestinationFolder -b bytes

Copy Example

Options

Argument Alias Type Description
sourceDir s string The source path to copy from.
outDir o string folder to copy to.
force f boolean Will overwrite any existing files.
glob g string glob pattern to copy. The glob pattern is applied within the source directory. For example: 'myFolder/**/*.js'
concurrentCopy number number of concurrent copy operations to perform. Defaults to 1
eta e boolean shows ETA of copy completion. For a lot of small files can be very inaccurate
chunk c boolean Copies the files in chunks using a readFileStream and a writeFileStream. 'highWaterMark' determines chunk size
speed boolean shows both overall speed for all files and individual file speed (if chunk is specified)
highWaterMark w '1kB' | '4MB' | '1GB' Highwatermark used for chunk size when copy method is 'chunk'. Defaults to '1048576'.
bar b 'bytes' | 'files' Shows either file count progress bar or bytes progress bar. If omitted both bars show
help h boolean shows this help guide

Markdown Generated by ts-command-line-args