1.0.0 • Published 5 years ago

rollup-plugin-cleaner v1.0.0

Weekly downloads
6,851
License
MIT
Repository
github
Last release
5 years ago

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

OptionTypeDescriptionDefault
targetsArrayList of directories which should be cleaned on every build.[]
silentBooleanFlag to disable logging output to console.false

Example

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

import cleaner from 'rollup-plugin-cleaner';

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

License

MIT