{"id":16400089,"url":"https://github.com/jwilsson/esbuild-clean-plugin","last_synced_at":"2025-08-13T18:51:39.003Z","repository":{"id":45563822,"uuid":"367620200","full_name":"jwilsson/esbuild-clean-plugin","owner":"jwilsson","description":"An esbuild plugin to clean your build folder.","archived":false,"fork":false,"pushed_at":"2025-04-18T07:29:22.000Z","size":38,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T21:34:19.353Z","etag":null,"topics":["clean","esbuild","esbuild-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwilsson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-15T12:00:08.000Z","updated_at":"2025-04-18T07:29:25.000Z","dependencies_parsed_at":"2025-02-15T11:23:17.587Z","dependency_job_id":"0a26cf82-3dea-4c26-a5f0-d39eae5a6d54","html_url":"https://github.com/jwilsson/esbuild-clean-plugin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jwilsson/esbuild-clean-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fesbuild-clean-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fesbuild-clean-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fesbuild-clean-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fesbuild-clean-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwilsson","download_url":"https://codeload.github.com/jwilsson/esbuild-clean-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fesbuild-clean-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270294659,"owners_count":24560334,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","esbuild","esbuild-plugin"],"created_at":"2024-10-11T05:26:42.618Z","updated_at":"2025-08-13T18:51:38.985Z","avatar_url":"https://github.com/jwilsson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esbuild-clean-plugin\n[![npm](https://img.shields.io/npm/v/esbuild-clean-plugin.svg)](https://www.npmjs.com/package/esbuild-clean-plugin)\n[![build](https://github.com/jwilsson/esbuild-clean-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/jwilsson/esbuild-clean-plugin/actions/workflows/build.yml)\n\nAn [esbuild](https://esbuild.github.io/) plugin to clean your build folder.\n\n## Installation\n```sh\nnpm install esbuild-clean-plugin\n```\n\n### Requirements\n* Node 22.11.0 (LTS) or later.\n* esbuild 0.18.20 or later.\n\n## Usage\n```js\nimport * as esbuild from 'esbuild';\nimport { cleanPlugin } from 'esbuild-clean-plugin';\nimport path from 'node:path';\n\nconst context = await esbuild.context({\n  bundle: true,\n  entryPoints: [path.resolve(import.meta.dirname, 'index.js')],\n  metafile: true,\n  outdir: path.resolve(import.meta.dirname, 'dist'),\n  plugins: [cleanPlugin({\n      // Plugin options\n  })],\n});\n\nawait context.watch();\n```\n\n*Note: The `metafile` and `outdir` options must be set for the plugin to have any effect.*\n\n### Options\n* `dry` (default `false`) - Run the plugin in dry mode, not deleting anything. Most useful together with the `verbose` option to see what would have been deleted.\n* `initialCleanPatterns` (default `['**/*']`) - File patterns to remove on plugin setup, useful to clean the build directory before creating new files. Pass an empty array to disable it.\n* `verbose` (default `false`) - Print all files that have been deleted after each run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwilsson%2Fesbuild-clean-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwilsson%2Fesbuild-clean-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwilsson%2Fesbuild-clean-plugin/lists"}