{"id":22202690,"url":"https://github.com/namchee/bun-plugin-strip-debug","last_synced_at":"2026-04-29T08:09:00.246Z","repository":{"id":219295765,"uuid":"717293516","full_name":"Namchee/bun-plugin-strip-debug","owner":"Namchee","description":"Strip console and debugger statements from your Bun.build output","archived":false,"fork":false,"pushed_at":"2024-01-27T12:34:27.000Z","size":46,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T07:05:14.174Z","etag":null,"topics":["bun","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/Namchee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-11-11T03:03:31.000Z","updated_at":"2024-07-14T17:39:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"78872068-5f8f-4706-9281-51088c4fc758","html_url":"https://github.com/Namchee/bun-plugin-strip-debug","commit_stats":null,"previous_names":["namchee/bun-plugin-strip-debug"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namchee%2Fbun-plugin-strip-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namchee%2Fbun-plugin-strip-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namchee%2Fbun-plugin-strip-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namchee%2Fbun-plugin-strip-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Namchee","download_url":"https://codeload.github.com/Namchee/bun-plugin-strip-debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245383119,"owners_count":20606265,"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":["bun","plugin"],"created_at":"2024-12-02T16:36:43.273Z","updated_at":"2026-04-29T08:08:55.224Z","avatar_url":"https://github.com/Namchee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @namchee/bun-plugin-strip-debug\n\nA Bun plugin that strips `console.*` and `debugger` statements from your `Bun.build` output.\n\n## Example\n\nGiven the following code:\n\n```ts\nconsole.log('Hello World!');\n\nfunction add(a: number, b: number): number {\n    debugger;\n    return a + b;\n}\n\nconsole['table']({ foo: 'bar' });\n```\n\nThis transformer will transform your code to the following code:\n\n```ts\nfunction add(a: number, b: number): number {\n    return a + b;\n}\n```\n\n## Installation\n\n```bash\n# Using npm\nnpm install -D @namchee/bun-plugin-strip-debug\n\n# Using yarn\nyarn add -D @namchee/bun-plugin-strip-debug\n\n# Using pnpm\npnpm install -D @namchee/bun-plugin-strip-debug\n\n# Using bun\nbun install -D @namchee/bun-plugin-strip-debug\n```\n\n## Usage\n\n```ts\nimport { stripDebug } from '@namchee/bun-plugin-strip-debug';\n\nBun.build({\n  entrypoints: ['\u003cyour_entrypoint\u003e'],\n  outdir: '\u003cyour_outdir\u003e',\n  plugins: [stripDebug()],\n});\n\n```\n\nSee [sample](./sample/build.ts) for complete example.\n\n## Options\n\n| Name           | Type       | Default                                                                           | Description                                                                                |\n| -------------- | ---------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |\n| `files`        | `RegExp`   | All JS and TS files in the project directory, including the e**X**tended variants | List of files to be processed by the plugin                                                |\n| `exclude`      | `string[]` | `[]`                                                                              | List of console methods to ignore when stripping console statements.                       |\n| `debugger`     | `boolean`  | `true`                                                                            | Allows the plugin to strip debugger statements.                                            |\n| `tsconfigPath` | `string`   | `process.cwd()/tsconfig.json`, if not found will use `{ target: \"es2015\" }`       | Path to TypeScript configuration file. Will be used for code traversal and transformation. |\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamchee%2Fbun-plugin-strip-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamchee%2Fbun-plugin-strip-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamchee%2Fbun-plugin-strip-debug/lists"}