# rollup-plugin-copied

> Copy files && directories with rollup

Latest version **0.0.3** (published 2018-07-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-copied
pnpm add rollup-plugin-copied
yarn add rollup-plugin-copied
bun add rollup-plugin-copied
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-07-23 |
| First published | 2018-03-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | FDD |
| Maintainers | sakitam-fdd |
| Keywords | rollup-plugin, assets, copy |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-copied
- Repository: https://github.com/sakitam-fdd/rollup-plugin-copied
- Homepage: https://github.com/sakitam-fdd/rollup-plugin-copied#README
- Issues: https://github.com/sakitam-fdd/rollup-plugin-copied/issues
- npm.io page: https://npm.io/package/rollup-plugin-copied

## Dependencies (1)

- [rollup-pluginutils](https://npm.io/package/rollup-pluginutils.md) ^2.0.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2018-07-23
- 0.0.2 — 2018-04-20
- 0.0.1 — 2018-03-14

## README

# rollup-plugin-copied

> Copy files && directories with rollup

[![Build Status](https://travis-ci.org/sakitam-fdd/rollup-plugin-copied.svg?branch=master)](https://www.travis-ci.org/sakitam-fdd/rollup-plugin-copied)
[![Npm package](https://img.shields.io/npm/v/rollup-plugin-copied.svg)](https://www.npmjs.org/package/rollup-plugin-copied)

## Install

```bash
npm i -D rollup-plugin-copied
```

## Usage

**rollup.config.js**

```js
const copy = require('rollup-plugin-copied');

const plugin = copy({
  from: './fixtures/',
  to: './dist/images',
  emitFiles: true // defaults to true
}, {
  watch: true
});

// or

const _plugin = copy([
  {
    from: './fixtures/',
    to: './dist/images',
    emitFiles: true // defaults to true
  }
], {
  watch: true
});

const config = {
  plugins: [
    plugin
  ]
}
```

## patterns {Array|Object}

### if use Object

| Name | Type | Default | Description |
| :--: | :--: | :-----: | :---------- |
| **`'from'`** | `{String}` | `undefined` | If `from` is directory, `to` has no extension or ends in `'/'` |
| **`'to'`** | `{String}` | `undefined` | If `to` has extension or `from` is file |
| **`'emitFiles'`** | `{String}` | `undefined` | `enable plugin` |

### if use Array

> Array item just like use Object

| Name | Type | Default | Description |
| :--: | :--: | :-----: | :---------- |
| **`'from'`** | `{String}` | `undefined` | If `from` is directory, `to` has no extension or ends in `'/'` |
| **`'to'`** | `{String}` | `undefined` | If `to` has extension or `from` is file |
| **`'emitFiles'`** | `{String}` | `undefined` | `enable plugin` |

## options

| Name | Type | Default | Description |
| :--: | :--: | :-----: | :---------- |
| **`'exclude'`** | `{Array}` | `[]` | Array of globs to ignore (applied to from) |
| **`'include'`** | `{Array}` | `[]` | Array of globs to include (applied to from) |
| **`'watch'`** | `{Boolean}` | `true` | When set to false, only the changes of the first resource are monitored, and the monitoring is not repeated. |

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