UNPKG

rollup-plugin-delete

Version:
38 lines 933 B
import { Options as Options$1 } from "del"; import { AsyncPluginHooks, Plugin } from "rollup"; interface Options extends Options$1 { /** * Rollup hook the plugin should use. * @default 'buildStart' */ readonly hook?: AsyncPluginHooks; /** * Delete items once. Useful in watch mode. * @default false */ readonly runOnce?: boolean; /** * Patterns of files and folders to be deleted. * * ```js * // Folder * del({ targets: 'build' }) * // File * del({ targets: 'dist/app.js' }) * // Multiple files * del({ targets: 'build/*.js' }) * // Mixed * del({ targets: ['dist/*', 'images/*.webp'] }) * ``` * * @default [] */ readonly targets?: readonly string[] | string; /** * Outputs removed files and folders to console. * @default false */ readonly verbose?: boolean; } declare function del(options?: Options): Plugin; export { Options, del as default };