{"id":13774903,"url":"https://github.com/vladshcherbin/rollup-plugin-delete","last_synced_at":"2026-05-23T00:31:44.496Z","repository":{"id":55927960,"uuid":"139413771","full_name":"vladshcherbin/rollup-plugin-delete","owner":"vladshcherbin","description":"Delete files and folders using Rollup","archived":false,"fork":false,"pushed_at":"2020-12-06T17:50:29.000Z","size":359,"stargazers_count":64,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T01:21:28.360Z","etag":null,"topics":["clean","clear","delete","directory","file","folder","remove","rollup","rollup-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vladshcherbin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-02T08:28:15.000Z","updated_at":"2024-03-25T14:01:57.000Z","dependencies_parsed_at":"2022-08-15T09:40:28.689Z","dependency_job_id":null,"html_url":"https://github.com/vladshcherbin/rollup-plugin-delete","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladshcherbin%2Frollup-plugin-delete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladshcherbin%2Frollup-plugin-delete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladshcherbin%2Frollup-plugin-delete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladshcherbin%2Frollup-plugin-delete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vladshcherbin","download_url":"https://codeload.github.com/vladshcherbin/rollup-plugin-delete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253533114,"owners_count":21923364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean","clear","delete","directory","file","folder","remove","rollup","rollup-plugin"],"created_at":"2024-08-03T17:01:31.551Z","updated_at":"2026-05-23T00:31:44.464Z","avatar_url":"https://github.com/vladshcherbin.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Output"],"readme":"# rollup-plugin-delete\n\nDelete files and folders using Rollup.\n\n## About\n\nThis plugin is useful when you want to clean `dist` or other folders and files before bundling. It's using [del package](https://github.com/sindresorhus/del) inside, check it for [pattern examples](https://github.com/sindresorhus/del?tab=readme-ov-file#patterns) and [additional options](https://github.com/sindresorhus/del?tab=readme-ov-file#options).\n\n## Installation\n\n```bash\n# pnpm\npnpm add rollup-plugin-delete -D\n\n# yarn\nyarn add rollup-plugin-delete -D\n\n# npm\nnpm install rollup-plugin-delete -D\n```\n\n## Usage\n\n```js\n// rollup.config.js\nimport del from 'rollup-plugin-delete'\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/app.js'\n  },\n  plugins: [\n    del({ targets: 'dist' })\n  ]\n}\n```\n\n### Configuration\n\nThere are some useful options:\n\n#### targets\n\nA string or an array of patterns of files and folders to be deleted. Default is `[]`.\n\n```js\n// Folder\ndel({\n  targets: 'build'\n})\n\n// Files\ndel({\n  targets: 'dist/*.js'\n})\n\n// Multiple targets\ndel({\n  targets: ['dist/*', 'images/*.webp']\n})\n```\n\n#### verbose\n\nOutput removed files and folders to console. Default is `false`.\n\n\u003e [!NOTE]  \n\u003e Use \\* (wildcard character) in pattern to show removed files\n\n```js\ndel({\n  targets: 'dist/*',\n  verbose: true\n})\n```\n\n#### hook\n\n[Rollup hook](https://rollupjs.org/plugin-development/#build-hooks) the plugin should use. Default is `buildStart`.\n\n```js\ndel({\n  targets: 'dist/*',\n  hook: 'buildEnd'\n})\n```\n\n#### runOnce\n\nType: `boolean` | Default: `false`\n\nDelete items once. Useful in watch mode.\n\n```js\ndel({\n  targets: 'dist/*',\n  runOnce: true\n})\n```\n\nAll other options are passed to [del package](https://github.com/sindresorhus/del) which is used inside.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladshcherbin%2Frollup-plugin-delete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvladshcherbin%2Frollup-plugin-delete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladshcherbin%2Frollup-plugin-delete/lists"}