13 个版本 (8 个破坏性版本)
0.10.1 | 2024年3月3日 |
---|---|
0.9.2 | 2023年4月2日 |
0.9.1 | 2022年4月16日 |
在 命令行工具 中排名 #347
每月下载量 302 次
88KB
2K SLoC
清洁器
清洁器是一个用于批量清理构建工件的工具。
它递归地在给定的 path
路径下查找以下项目类型的特定构建文件夹
- Rust -
target
- .Net -
bin
,obj
- Web -
node_modules
- Angular -
.angular
,.run
- Typescript/Deno - 'dist'
安装
cargo install cleaner
或者
cargo install --git https://github.com/nejat/cleaner.git
* 需要 Rust 和 cargo - Rust 安装说明
用法
Cleaner is a utility for cleaning up build artifacts in bulk
Usage: cleaner.exe <COMMAND>
Commands:
builds Manage build artifacts of supported platforms
empties Manage empty folders
repos Search through repos
supported Manage supported development platforms
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
命令
构建
管理配置平台的构建工件
Manage build artifacts of supported platforms
Usage: cleaner.exe builds <COMMAND>
Commands:
list List matching build artifacts
remove Remove matching build artifacts
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
构建列表
列出匹配的构建工件
List matching build artifacts
Usage: cleaner.exe builds list [OPTIONS] [PATH]
Arguments:
[PATH]
Optionally specify target path, defaults to current folder
[default: .]
Options:
-t, --types <TYPES>
Optionally specify supported development platform(s), defaults to "all"
* use "supported" command to see a list of all supported development platforms
[default: all]
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
构建移除
移除匹配的构建工件
Remove matching build artifacts
Usage: cleaner.exe builds remove [OPTIONS] [PATH]
Arguments:
[PATH]
Optionally specify target path, defaults to current folder
[default: .]
Options:
-t, --types <TYPES>
Optionally specify supported development platform(s), defaults to "all"
* use "supported" command to see a list of all supported development platforms
[default: all]
-y, --confirmed
Executes remove action without confirmation, defaults to interactive confirmation
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
清空
管理空文件夹,默认跳过隐藏文件夹
Manage empty folders
Usage: cleaner.exe empties <COMMAND>
Commands:
list List matching empty folders
remove Remove matching empty folders
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
清空列表
列出匹配的空文件夹
List matching empty folders
Usage: cleaner.exe empties list [OPTIONS] [PATH]
Arguments:
[PATH] Optionally specify target path, defaults to current folder [default: .]
Options:
-s, --hidden Includes empty hidden folders, i.e. folders that start with a '.'
-h, --help Print help
-V, --version Print version
清空移除
移除匹配的空文件夹
Remove matching empty folders
Usage: cleaner.exe empties remove [OPTIONS] [PATH]
Arguments:
[PATH] Optionally specify target path, defaults to current folder [default: .]
Options:
-y, --confirmed Executes remove action without confirmation, defaults to interactive confirmation
-s, --hidden Includes empty hidden folders, i.e. folders that start with a '.'
-h, --help Print help
-V, --version Print version
仓库
搜索 Git 仓库
Search through repos
Usage: cleaner.exe repos <COMMAND>
Commands:
branched List repositories not in master or main
changes List repositories with uncommitted changes
detached List detached repositories, HEAD
error List repositories with errors
init List repositories that are only initialized (unborn)
list List repositories
local List repositories with no remotes configured
main List repositories with a "Main" branch
master List repositories with a "Master" branch
outdated List outdated repos
up-to-date List repositories that are up-to-date
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
过时
搜索与其远程同步的 Git 仓库
List outdated repos
Usage: cleaner.exe repos outdated [OPTIONS] [PATH]
Arguments:
[PATH]
Optionally specify target path, defaults to current folder
[default: .]
Options:
-f, --filter <FILTER>
Filters outdated repos
[default: either]
Possible values:
- ahead: Only include outdated repos that are ahead in commits of the remote
- either: Either Ahead or Behind (Default Value)
- behind: Only include outdated repos that are behind in commits of the remote
-m, --main
Only check repo's Main branch
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
最新
搜索与其远程同步的 Git 仓库
List repositories that are up-to-date
Usage: cleaner.exe repos up-to-date [OPTIONS] [PATH]
Arguments:
[PATH] Optionally specify target path, defaults to current folder [default: .]
Options:
-m, --main Only check repo's Main branch
-h, --help Print help
-V, --version Print version
支持
支持的开发平台配置
Manage supported development platforms
Usage: cleaner.exe supported <COMMAND>
Commands:
list List configured development platforms
path Show path of platform configuration file
manage Manage platform configuration
reset Reset platform configuration to default
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
支持列表
初始/默认支持平台列表
Platform: .Net
Build Artifacts: bin & obj
Matched On: *.sln & *.csproj
Platform: Rust
Build Artifacts: target
Matched On: cargo.toml
Platform: Web
Build Artifacts: node_modules
Matched On: package.json
Platform: Angular
Build Artifacts: .angular & .run
Matched On: angular.json
Platform: Typescript
Build Artifacts: dist
Matched On: tsconfig.json
* 删除或重置配置将重新创建此列表
路线图
- 列出具有构建工件的计划
- 从计划中删除构建工件
- 列出空文件夹
- 删除空文件夹
- 配置以支持自定义开发平台列表
- 通配符支持用于匹配确定平台类型的文件
- 路径命令以显示支持的配置 json 路径
- 重置命令将支持的配置 json 重置为默认值
- 列出支持的平台
- 管理配置列表的命令
- 更好地处理输入取消
- 将考虑针对检测构建工件的新逻辑,并将考虑拉取请求
依赖项
~16–26MB
~454K SLoC