npm

rollup-plugin-empty

1.0.0 • Public • Published

rollup-plugin-empty

A rollup plugin for emptying dir or deleting files.

Installation

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

Usage

rollup.config.js

generate chunks

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

Package Sidebar

Install

npm i rollup-plugin-empty

Weekly Downloads

83

Version

1.0.0

License

MIT

Unpacked Size

2.66 kB

Total Files

3

Last publish

Collaborators

  • fengxinming