2.0.0 • Published 4 years ago

rollup-plugin-delete v2.0.0

Weekly downloads
25,406
License
MIT
Repository
github
Last release
4 years ago

rollup-plugin-delete

Build Status Codecov

Delete files and folders using Rollup.

About

This plugin is useful when you want to clean dist or other folders and files before bundling. It's using del package inside, check it for pattern examples.

Installation

# yarn
yarn add rollup-plugin-delete -D

# npm
npm install rollup-plugin-delete -D

Usage

// rollup.config.js
import del from 'rollup-plugin-delete'

export default {
  input: 'src/index.js',
  output: {
    file: 'dist/app.js',
    format: 'cjs'
  },
  plugins: [
    del({ targets: 'dist/*' })
  ]
}

Configuration

There are some useful options:

targets

A string or an array of patterns of files and folders to be deleted. Default is [].

del({
  targets: 'dist/*'
})

del({
  targets: ['dist/*', 'build/*']
})

verbose

Output removed files and folders to console. Default is false.

del({
  targets: 'dist/*',
  verbose: true
})

Note: use * (wildcard character) in pattern to show removed files

hook

Rollup hook the plugin should use. Default is buildStart.

del({
  targets: 'dist/*',
  hook: 'buildEnd'
})

runOnce

Type: boolean | Default: false

Delete items once. Useful in watch mode.

del({
  targets: 'dist/*',
  runOnce: true
})

All other options are passed to del package which is used inside.

License

MIT

stake-trunk-stagingsharechest-launcher@workrails/wr-catalog-basestake-trunkvigoworks.componentsreact-new-first-libchange-ad-componentstakla-builderform-manager-reactinbegroad-mono@inbegroad-tools/admin@inbegroad-tools/clone@inbegroad-tools/mono-admintalxis-react-componentsduckui-testfindanherb-axios-module@everything-registry/sub-chunk-2680kakapay-js-sdkkn-ui-submodules@archielite/vite-define-config@atlassian/aux-rollup-config@0xforkitall/rollup-configalps-library@amyscript/custom-input@amyscript/dsg-input@truerenton/uilib@types/rollup-plugin-delete@situaction/traq-ui-ste@techstack/tcm-cli@tangible/roller@wcfactory/rollup-umd-build@thx/rollup-config-thx@tao.shu/input@zep.us/rollup-config-zep-script@akhttar4.0/akhttarsbv15sg@avioos/av-token@baleada/prepare@bootcamp-project/rollupjs-config@brixtol/rollup-configbingic-rc@credify/crypto-key-composerc-noticecanvas-credit-scorecx-noticecuveelzx-requestmevo-componentsomg-common-web-apilees_first_npmchakra-data-tables@byiam/iam-tokennotification-panfilovmtl-react-uimy-smart-rendercsnpm-testlucbevilaqua-react-ui-kitpadlpapito-shared-vuepackage-cli-serviceplate-data-grandwapl-clitestxkcwallhaven-type-api@infotition/tsi@sajal-maloo/common@sagacious/cli@sagacious/template-package@samantha-uk/tools-builder@sharechest/connector@tushar6698/js-library@tushar6698/react-library@sissel/rollup-config@srmcguirt/rollup-config@supchat/tools@yishayweb/package-with-deps@wsqsl/common-method@custom-lb/build-utils@custom-lb/build-utils-vue2@darrenmothersele/builder@blueking/bkchart.js@blueking/bkcharts@blueprintui/cli@devlander/findanherb-axios-modulerollup-umd-buildrollup-config-badger-denreact-component-library-view-ui-lx@exalt/toolchain@hidetoxic/kuroko-utilsrollup-importable-module@doctorwork/remax-clicoinstratlarge-data-tablelocal-image-testkeen-rollup-componentcnhis-design-buildlongto-blocklysharlq-comp-lib@infinitebrahmanuniverse/nolb-rollup-plugin-dsharedrequireplugin
2.0.0

4 years ago

1.2.0

4 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago