# rollup-plugin-cleaner

> A rollup plugin to clean directories before rebuilding.

Latest version **1.0.0** (published 2019-07-02) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-07-02 |
| First published | 2017-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.0 |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Safeer Ahmed |
| Maintainers | miappi-safeer |
| Keywords | rollup, rollup-plugin, clean, remove, delete |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-cleaner
- Repository: https://github.com/saf33r/rollup-plugin-cleaner
- Homepage: https://github.com/saf33r/rollup-plugin-cleaner#readme
- Issues: https://github.com/saf33r/rollup-plugin-cleaner/issues
- npm.io page: https://npm.io/package/rollup-plugin-cleaner

## Dependencies (1)

- [rimraf](https://npm.io/package/rimraf.md) ^2.6.3

## 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

- 1.0.0 (latest) — 2019-07-02
- 0.2.0 — 2018-01-02
- 0.1.0 — 2017-12-12

## README

# rollup-plugin-cleaner

:wastebasket: A rollup plugin to clean directories before rebuilding.

## Installation

### npm

`npm install rollup-plugin-cleaner --save-dev`

### yarn

`yarn add rollup-plugin-cleaner --dev`

## Usage

### Options

| Option    | Type      | Description                                                 | Default |
| --------- | --------- | ----------------------------------------------------------- | ------- |
| `targets` | `Array`   | List of directories which should be cleaned on every build. | `[]`    |
| `silent`  | `Boolean` | Flag to disable logging output to console.                  | `false` |

### Example

To remove the `build` directory on every build add the following to `rollup.config.js`:

```JavaScript
import cleaner from 'rollup-plugin-cleaner';

export default {
  entry: './src/index.js',
  output: {
    dest: './build/bundle.js',
  },
  plugins: [
    cleaner({
      targets: [
        './build/'
      ]
    })
  ]
};
```

## License

MIT

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