Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/valentiniljaz/rollup-plugin-clean-after

Clean up dirs after the Rollup build ends
https://github.com/valentiniljaz/rollup-plugin-clean-after

Last synced: 24 days ago
JSON representation

Clean up dirs after the Rollup build ends

Awesome Lists containing this project

README

        

# Rollup.js plugin: Clean after

Clean up dirs after the Rollup build ends

## Installation

### npm

`npm install rollup-plugin-clean-after --save-dev`

### yarn

`yarn add rollup-plugin-clean-after --dev`

## Usage

### Options

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

### Example

To remove the `dist/src` directory after every build add the following to `rollup.config.js`:

```JavaScript
import cleanAfter from 'rollup-plugin-clean-after';

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

## License

MIT