# rollup-plugin-empty

> A rollup plugin for emptying dir or deleting files

Latest version **1.0.0** (published 2020-03-29) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-03-29 |
| First published | 2020-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jesse Feng |
| Maintainers | fengxinming |
| Keywords | rollup, rollup-plugin, empty |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-empty
- Repository: https://github.com/fengxinming/rollup-plugins/tree/master/packages/rollup-plugin-empty
- Homepage: https://github.com/fengxinming/rollup-plugins/tree/master/packages/rollup-plugin-empty#readme
- Issues: https://github.com/fengxinming/rollup-plugins/tree/master/packages/rollup-plugin-empty/issues
- npm.io page: https://npm.io/package/rollup-plugin-empty

## Dependencies (3)

- [globby](https://npm.io/package/globby.md) ^11.0.0
- [clrsole](https://npm.io/package/clrsole.md) ^3.0.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.0

## 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) — 2020-03-29

## README

# rollup-plugin-empty

> A rollup plugin for emptying dir or deleting files.

## Installation

```bash
npm install rollup-plugin-empty --save-dev
```

## Usage

rollup.config.js

### generate chunks

```js
const empty = require('rollup-plugin-empty');
const match = require('rollup-plugin-match');

module.exports = {
  input: 'src/*.js',
  plugins: [
    empty({
      silent: false,
      dir: 'dist/es'
    }),
    match()
  ],
  output: {
    dir: 'dist/es',
    format: 'es'
  }
};

```

## Options
- file `String|Array` delete files if matches
- dir `String|Array` empty dir if matches
- silent `Boolean` show info after deleting
- glob see the [fast-glob options](https://github.com/mrmlnc/fast-glob#options-3)

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