## Usage ```js var copy = require('{%= name %}'); ``` See the [API documentation](#api) for usage details and available methods. ## Examples The main export is a function that takes: - `src` - glob pattern or file path(s) - `dest` - the destination directory - `cb` - callback function ```js copy('*.js', 'foo', function(err, files) { if (err) throw err; // `files` is an array of the files that were copied }); ``` **Usage with [gulp][]** In your project's gulpfile.js: ```js var gulp = require('gulp'); var copy = require('copy'); gulp.task('default', function (cb) { copy('fixtures/*.txt', 'actual', cb); }); ``` ## API {%= apidocs("index.js") %} ## CLI To use the CLI, install `copy` globally with the following command: ```js $ npm install --global copy ``` This adds `copy` to your system path, allowing the `copy` command to be executed anywhere. **CLI usage** ```sh $ copy ``` - `patterns`: glob pattern or array of file paths - `dir`: destination directory **Example** Copy* all files with the `.js` extension to the `foo` directory ```sh $ copy *.js foo ``` *Note that glob patterns may need to be wrapped in quotes depending on the shell you're using. ## History **v0.2.0 - breaking changes** - The API was changed in 0.2.0. please review the [API documentation](#api)