Crates.io | swim-clean-all |
lib.rs | swim-clean-all |
version | 0.2.1 |
created_at | 2025-01-04 06:32:24.863911+00 |
updated_at | 2025-01-19 01:31:48.670899+00 |
description | Recursively cleans swim projects |
homepage | |
repository | https://github.com/ethanuppal/swim-clean-all |
max_upload_size | |
id | 1503702 |
size | 142,484 |
swim
subcommand inspired by the amazing
cargo-clean-all
for Rust
(although they probably have a better implementation than the hacky code I
wrote!).
You can even set a config file to, for example, automatically skip certain directories.
Make sure you have swim
installed.
That's it!
Install from crates.io:
cargo install swim-clean-all
(Sorry, no cargo binstall
magic yet.)
$ swim clean-all --help
Usage: swim-clean-all [<search_root>] [--skip <skip...>] [--max-depth <max-depth>] [--config <config>] [--ignore-config] [--verbose]
Recursively clean all swim projects in a given directory that match the specified criteria
Positional Arguments:
search_root the root directory to recursively search for swim projects;
defaults to the cwd
Options:
--skip directories to skip when traversing
--max-depth maximum depth search limit; defaults to 100
--config manually specify a config path, e.g., foo.toml
--ignore-config do not load and extend the config file
--verbose print debugging information
--help, help display usage information
Note that cleaning a project will erase the entire build folder instead of
calling swim clean
-- I will add support for this customization if requested.
This subcommand searches for a file named swim-clean-all.toml
:
XDG_CONFIG_HOME
, if
specified;Platform | Value | Example |
---|---|---|
Linux | $XDG_CONFIG_HOME or $HOME /.config |
/home/alice/.config |
macOS | $HOME /Library/Application Support |
/Users/Alice/Library/Application Support |
Windows | {FOLDERID_LocalAppData} |
C:\Users\Alice\AppData\Local |
~/.config
Refer to the definition of struct Config
in the source code:
# swim-clean-all.toml
# these are NOT the defaults
skip = ["~/Library"]
max-depth = 50