# gulp-copy

> Plugin copying files to a new destination and using that destination for other actions

Latest version **5.0.0** (published 2024-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-copy
pnpm add gulp-copy
yarn add gulp-copy
bun add gulp-copy
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2024-09-11 |
| First published | 2014-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/gulp-copy) |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 67 |
| Author | Klaas Cuvelier |
| Maintainers | klaascuvelier |
| Keywords | gulpplugin, copy, gulp |

## Links

- npm: https://www.npmjs.com/package/gulp-copy
- Repository: https://github.com/klaascuvelier/gulp-copy
- Issues: https://github.com/klaascuvelier/gulp-copy/issues
- npm.io page: https://npm.io/package/gulp-copy

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ^2.0.3
- [plugin-error](https://npm.io/package/plugin-error.md) ^2.0.1

## Recent versions

- 5.0.0 (latest) — 2024-09-11
- 0.0.2 (0.0.2) — 2014-08-12
- 4.0.1 — 2018-10-12
- 4.0.0 — 2018-09-21
- 1.1.0 — 2018-01-09
- 1.0.1 — 2017-08-12
- 1.0.0 — 2016-12-01

## README

[![npm version](https://badge.fury.io/js/gulp-copy.svg)](https://www.npmjs.com/package/gulp-copy)
[![build status](https://circleci.com/gh/klaascuvelier/gulp-copy.svg?style=shield&circle-token=1dddfa2a1b153a5e5b7c00598a42b66842169eb2)](https://circleci.com/gh/klaascuvelier/gulp-copy/)

# gulp-copy

Copy source files to new destination and use that destination as new source (for further piping).
Automatically creates needed folders before proceeding. Ability to remove 'prefixes' from path.

Most likely you don't need this package for your gulp pipeline, a lot can be accomplished with just `gulp.dest`.
A reason to use this package would be to keep some depth (prefix options).

## Usage

```js
// gulpfile.js

var gulpCopy = require('gulp-copy');
var otherGulpFunction = require('gulp-other-function');
var sourceFiles = ['source1/*', 'source2/*.txt'];
var destination = 'dest/';
var outputPath = 'some-other-dest/';

return gulp
    .src(sourceFiles)
    .pipe(gulpCopy(outputPath, options))
    .pipe(otherGulpFunction())
    .dest(destination);
```

### Options

`prefix`: integer, defining how many parts of the path (separated by /) should be removed from the original path

### Example

A simple implemention of a gulpfile using `gulp-copy` is available in the [example](./example) folder.
You can run `gulp` or `npx gulp` from within the folder.

## Updates

See [changelog](CHANGELOG.md) for all updates.

---
_Source: https://npm.io/package/gulp-copy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
