{"id":26964369,"url":"https://github.com/septh/rollup-plugin-code-raker","last_synced_at":"2026-02-09T22:03:15.975Z","repository":{"id":266964743,"uuid":"897764090","full_name":"Septh/rollup-plugin-code-raker","owner":"Septh","description":"A Rollup plugin that rakes your bundle to remove dead leaves.","archived":false,"fork":false,"pushed_at":"2025-08-31T13:16:54.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T05:35:22.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Septh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":null,"patreon":"Septh","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/septh07"]}},"created_at":"2024-12-03T07:43:26.000Z","updated_at":"2025-08-31T13:16:58.000Z","dependencies_parsed_at":"2025-04-03T06:31:31.975Z","dependency_job_id":"93f0f6a4-4e97-4c01-9519-f28f1192684e","html_url":"https://github.com/Septh/rollup-plugin-code-raker","commit_stats":null,"previous_names":["septh/code-raker","septh/rollup-plugin-code-raker"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Septh/rollup-plugin-code-raker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-code-raker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-code-raker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-code-raker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-code-raker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Septh","download_url":"https://codeload.github.com/Septh/rollup-plugin-code-raker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-code-raker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29283031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"ssl_error","status_checked_at":"2026-02-09T21:57:11.537Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-04-03T06:30:45.425Z","updated_at":"2026-02-09T22:03:15.952Z","avatar_url":"https://github.com/Septh.png","language":"TypeScript","funding_links":["https://patreon.com/Septh","https://paypal.me/septh07"],"categories":[],"sub_categories":[],"readme":"![NPM Version](https://img.shields.io/npm/v/rollup-plugin-code-raker?label=latest)\n![Rollup 4.0](https://img.shields.io/badge/Rollup-%3E%3D4.0.0-orange)\n![Vite 5.0](https://img.shields.io/badge/Vite-%3E%3D5.0.0-purple)\n![MIT License](https://img.shields.io/npm/l/rollup-plugin-code-raker)\n\n# rollup-plugin-code-raker\n\u003e A Rollup/Vite plugin that rakes your bundle to remove dead leaves.\n\n## Features\n- Removes leftover comments, `console.*` calls and `debugger` statements from your bundle.\n- Does not come in the way of treeshaking: remaining function annotations are removed *after* Rollup/Vite did their magic.\n- Fully configurable.\n- Comes with sensible defaults for both application and library bundling.\n\n## Requirements\nThis plugin requires Rollup 4 or later or Vite 5 or later.\n\n## Usage\nInstall the plugin using your favorite package manager:\n\n```sh\nnpm install --save-dev rollup-plugin-code-raker\n```\n\nThen import the plugin in your `rollup.config.js`/`vite.config.js`:\n\n```js\nimport rake from 'rollup-plugin-code-raker'\n\nexport default {\n    ...\n    plugins: [\n        rake(/* options */)\n    ]\n}\n```\n\n## Options\ncode-raker uses *presets* to decide what to remove from code.\n- The default preset is a \"kill'em all\" preset that blindly **removes** all comments (including licensing and documentation comments), all `console.*` calls and `debugger` statements.\n- The `application` preset **preserves** licensing comments and `console.info`, `console.warn`, `console.error` and `console.debug` calls.\n- The `library` preset **preserves** licensing and documentation comments.\n\n\u003e [!NOTE]\n\u003e - *Licensing* comments are block comments that start with `/*!` followed by a space or a newline, or documentation comments that contain the `@license` tag.\n\u003e - *Documentation*, or JsDoc/TsDoc comments, are block comments that start with `/**` followed by a space or a newline.\n\u003e - *Annotations* are block comments that contain one of these strings: `#__PURE__`, `@__PURE__`, `#__NO_SIDE_EFFECTS__`, `@__NO_SIDE_EFFECTS__`. See https://rollupjs.org/configuration-options/#treeshake-annotations for more info.\n\nAll options are optional.\n\n```typescript\nexport interface Options {\n    /**\n     * The name of a preset to use or extend upon.\n     *\n     * Default: undefined.\n     */\n    preset?: 'library' | 'application'\n\n    /**\n     * Set to `true` to remove all comments, `false` to remove none, or an object\n     * to only remove select comments.\n     *\n     * Default depends on the selected preset:\n     * - default: remove all comments.\n     * - library: preserve licensing and JsDoc/TsDoc comments, remove everything else.\n     * - application: preserve licensing comments, remove everything else.\n     *\n     * Note that this setting only targets \"meaningful\" comments; common block comments (`/*`)\n     * and line comments (`//`) are always removed.\n     */\n    comments?: boolean | {\n        /**\n         * Whether to remove licensing comments.\n         */\n        licenses?: boolean | ((comment: string) =\u003e boolean)\n\n        /**\n         * Whether to remove documentation comments.\n         */\n        docs?: boolean | ((comment: string) =\u003e boolean)\n\n        /**\n         * Whether to remove annotations.\n         */\n        annotations?: boolean\n    }\n\n    /**\n     * Set to `true` to remove all `console` calls, `false` to remove none, or a callback\n     * or an object to only remove select `console` calls.\n     *\n     * Default depends on the selected preset:\n     * - default: remove all `console` methods calls.\n     * - library: remove all `console` methods calls.\n     * - application: preserve `info`, `warn`, `error` and `debug` methods calls,\n     *   remove all others.\n     */\n    console?:  boolean | ((method: string, statement: string) =\u003e boolean) | {\n        /**\n         * An array of console methods names to remove.\n         */\n        include?: string[]\n        /**\n         * An array of console methods names to preserve.\n         */\n        exclude?: string[]\n    }\n\n    /**\n     * Set to `true` to remove `debugger` statements, or `false` to leave them in code.\n     *\n     * Default: `true` in all presets.\n     */\n    debugger?: boolean\n}\n```\n\n## License\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepth%2Frollup-plugin-code-raker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsepth%2Frollup-plugin-code-raker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepth%2Frollup-plugin-code-raker/lists"}