Package Exports
- rollup-plugin-delete
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-delete) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rollup-plugin-delete
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
npm install rollup-plugin-delete --save-dev
# or
yarn add 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
Outputs removed files and folders to console. Default is false
.
del({
targets: 'dist/*',
verbose: true
})
Note: use * (wildcard character) to show removed files
Del package options
dryRun
Shows what would be deleted without actual delete. Default is false
.
del({
targets: 'dist/*',
dryRun: true
})
force
Allows deleting current working directory and outside. Default is false
.
del({
targets: 'dist/*',
force: true
})
concurrency
Concurrency limit. Default is Infinity
.
del({
targets: 'dist/*',
concurrency: 5
})
License
MIT