#cli #cargo #wipe #target #node-modules

app cargo-wipe

recursively wipe target and node_modules folders

9 releases

0.3.3 Aug 22, 2022
0.3.2 Oct 31, 2021
0.3.1 Jan 11, 2021
0.3.0 Oct 17, 2020
0.1.3 May 21, 2020

#112 in Command line utilities

Download history 18/week @ 2022-12-02 59/week @ 2022-12-09 16/week @ 2022-12-16 9/week @ 2022-12-23 11/week @ 2022-12-30 6/week @ 2023-01-06 11/week @ 2023-01-13 12/week @ 2023-01-20 10/week @ 2023-01-27 16/week @ 2023-02-03 32/week @ 2023-02-10 22/week @ 2023-02-17 7/week @ 2023-02-24 6/week @ 2023-03-03 15/week @ 2023-03-10 67/week @ 2023-03-17

95 downloads per month

MIT license

77KB
993 lines

Cargo Wipe

Crates CI codecov license Crates.io
Cargo subcommand that recursively finds and optionally wipes all "target" or "node_modules" folders that are found in the current path.

Usage

Install

The Rust toolchain is a prerequisite.

cargo install cargo-wipe

Read the docs

cargo wipe --help

Use

To find build folders for <language> that can potentially be deleted run

cargo wipe <language>

where <language> is rust or node. For example:

cargo wipe rust

This will run in dry-run mode and just print the list of directories to delete. To actually delete them run it again with the -w flag.

cargo wipe rust -w

Directories are found according to the following logic:

  • rust: all directories called target containing a file called .rustc_info.json.
  • node: all directories called node_modules.

You can use the -i <path> argument to ignore certain paths.

Usage Example

Usage Example Screenshot

Contributions

Contributions are welcome and encouraged! See /issues for ideas, or suggest your own! If you're thinking to create a PR with large feature/change, please first discuss it in an issue.

PR Checks

    cargo make ci-flow

Releases

  • Update version in Cargo.toml

  • Update CHANGELOG.md

  • Commit

  • Add tag

    git tag -a vX.X.X
    
  • Push

    git push --follow-tags
    
  • Release
    Create a new release.
    publish.yml GitHub Action will pick it up and do the actual release to crates.io.

Dependencies

~3.5MB
~68K SLoC