Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mstssk/rollup-plugin-cleandir
๐งน Rollup plugin to Clean output directories automatically.
https://github.com/mstssk/rollup-plugin-cleandir
clean directory plugin rollup
Last synced: 9 days ago
JSON representation
๐งน Rollup plugin to Clean output directories automatically.
- Host: GitHub
- URL: https://github.com/mstssk/rollup-plugin-cleandir
- Owner: mstssk
- License: mit
- Created: 2020-06-28T16:04:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T08:41:16.000Z (7 months ago)
- Last Synced: 2024-04-23T11:20:01.522Z (7 months ago)
- Topics: clean, directory, plugin, rollup
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/rollup-plugin-cleandir
- Size: 151 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rollup-plugin-cleandir
[![Test](https://github.com/mstssk/rollup-plugin-cleandir/workflows/Test/badge.svg)](https://github.com/mstssk/rollup-plugin-cleandir/actions?query=workflow%3ATest)
[![npm version](https://badge.fury.io/js/rollup-plugin-cleandir.svg)](https://badge.fury.io/js/rollup-plugin-cleandir)๐งน Rollup plugin to Clean output directories automatically.
## Install
```
$ npm install --save-dev rollup-plugin-cleandir
```## Usage
```js
import { cleandir } from "rollup-plugin-cleandir";const OUT_DIR = "./dist";
export default {
input: ["index.js"],
output: {
dir: OUT_DIR,
format: "es",
},
plugins: [cleandir(OUT_DIR)],
};
```You can also specify `hook` and `order` options.
```js
export default {
// ...
plugins: [cleandir(OUT_DIR, { hook: "options", order: "pre" })],
};
```