Package Exports
- cpy
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 (cpy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cpy 
Copy files
- 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 --save cpy
Usage
var cpy = require('cpy');
cpy(['src/*.png', '!src/goat.png'], 'dist', function (err) {
console.log('files copied');
});
API
cpy(files, destination, [options], [callback])
files
Required
Type: array
Files to copy.
destination
Required
Type: string
Destination directory.
options
Type: object
Options are passed to cp-file and glob.
cwd
Type: string
Default: process.cwd()
The working directory to look for the source files.
parents
Type: boolean
Default: false
Keep the path structure when copying files.
rename
Type: string
The filename which is used to rename every file in files
.
callback(err)
Type: function
CLI
$ npm install --global cpy
$ cpy --help
Usage
$ cpy <source>... <destination> [--no-overwrite] [--parents] [--cwd=<dir>] [--rename=<filename>]
Example
$ cpy 'src/*.png' '!src/goat.png' dist
Options
--no-overwrite Don't overwrite the destination
--parents Preseve path structure
--cwd=<dir> Working directory for source files
--rename=<filename> Rename all <source> filenames to <filename>
<source> can contain globs if quoted
Related
See cp-file
if you only need to copy a single file.
License
MIT © Sindre Sorhus