{"id":19068557,"url":"https://github.com/lydanne/rmdev","last_synced_at":"2025-06-11T16:05:31.107Z","repository":{"id":249421833,"uuid":"831462979","full_name":"Lydanne/rmdev","owner":"Lydanne","description":"This is a tool to delete the remaining dependencies and cache files in the development environment, eg: nodule_modules、target...","archived":false,"fork":false,"pushed_at":"2024-07-22T02:46:27.000Z","size":254,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T09:23:54.287Z","etag":null,"topics":["cli","rust","tools","tui"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Lydanne.png","metadata":{"files":{"readme":"readme-zh.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":"2024-07-20T16:12:00.000Z","updated_at":"2024-08-17T01:34:30.000Z","dependencies_parsed_at":"2024-07-20T18:00:40.443Z","dependency_job_id":"22f265f0-5dec-41cd-902d-e891d527d333","html_url":"https://github.com/Lydanne/rmdev","commit_stats":null,"previous_names":["wumacoder/rmdev","lydanne/rmdev"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lydanne%2Frmdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lydanne%2Frmdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lydanne%2Frmdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lydanne%2Frmdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lydanne","download_url":"https://codeload.github.com/Lydanne/rmdev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223772077,"owners_count":17199978,"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":["cli","rust","tools","tui"],"created_at":"2024-11-09T01:09:57.693Z","updated_at":"2024-11-09T01:09:58.144Z","avatar_url":"https://github.com/Lydanne.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003ch1\u003eRmdev\u003c/h1\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\u003cimg src=\"./assets/home.png\" width=\"80%\" /\u003e\u003c/p\u003e\n  \u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/rmdev?style=for-the-badge\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/WumaCoder/rmdev?style=for-the-badge\" /\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## 开始\n\n这是一个工具，用于删除开发环境中的剩余依赖项和缓存文件，例如：node_modules、target 等。\n\n## 特性\n\n- 🌟 批量删除\n- 🚀 快速删除\n- 🗑 支持多类型项目工程\n  - nodejs (node_modules)\n  - rust (target)\n  - ...\n\n## 安装\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # 安装 cargo\n\ncargo install rmdev\n```\n\n## 使用\n\n```shell\nrmdev clear ../ -f\n\n# ../ 清除 target 目录\n```\n\n## 帮助\n\n```shell\nrmdev clear --help\n```\n\n## 跳过扫描\n\n在你的项目中添加 `rmdev.skip` 文件即可跳过删除。\n\n## 贡献\n\n我希望这个工具最终能覆盖所有主要语言，但更多的工作需要大家的贡献 ❤️！\n\n我们可以通过修改 `src/scan_category.rs` 文件来贡献，并在 PR 中说明是什么语言生成的什么工具。\n\n```rs\nuse std::path::Path;\n\nuse once_cell::sync::Lazy;\n\npub(crate) static STRATEGY: Lazy\u003cVec\u003cScanCate\u003e\u003e =\n    Lazy::new(|| vec![ScanCate::Npm, ScanCate::Cargo]);\n\n#[derive(Debug, Clone)]\npub enum ScanCate {\n    Npm,\n    Cargo,\n}\n\nimpl ScanCate {\n    pub(crate) fn access_keyfile(\u0026self, path: \u0026Path) -\u003e bool {\n        match self {\n            Self::Npm =\u003e path.join(\"package.json\").exists(),\n            Self::Cargo =\u003e path.join(\"Cargo.toml\").exists(),\n        }\n    }\n\n    pub(crate) fn rm_keyfile(\u0026self, path: \u0026Path) -\u003e bool {\n        match self {\n            Self::Npm =\u003e path.to_str().unwrap().contains(\"node_modules\"),\n            Self::Cargo =\u003e path.to_str().unwrap().contains(\"target\"),\n        }\n    }\n\n    pub(crate) fn ident(\u0026self) -\u003e String {\n        match self {\n            Self::Npm =\u003e \"NPM\",\n            Self::Cargo =\u003e \"Cargo\",\n        }\n        .to_string()\n    }\n}\n```\n\n整个过程非常简单，欢迎大家贡献。\n\n## 关于\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flydanne%2Frmdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flydanne%2Frmdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flydanne%2Frmdev/lists"}