#workspace #cleanup #clean #nodejs #cargo-toml #package-json #json-file

app clean-workspace

Utility to remove package folders from projects in a workspace

3 stable releases

1.1.0 Aug 5, 2023
1.0.1 Apr 13, 2021

#1980 in Command line utilities

MIT license

7KB
93 lines

clean-workspace

This is a utility to recursively remove packages and build files and folders from a workspace folder.

Currently supported project types:

  • NodeJS / NPM (node_modules)
  • Rust / Cargo (target)

The utility looks for a package.json file or a Cargo.toml file in a folder to determine if there is a possibility of the node_modules folder for package.json files or target folder for Cargo.toml files exists. If so the full path to the node_modules folder or target folder are queued and removed at the end.

This is valuable if you have a workspace folder with many projects scattered throughout that you would like to clean up these large folders without tracking them down yourself. Currently the tool only has a dry-run flag to print the folders it has identified for removal.

Enhancements and bug fixes are welcome.

Dependencies

~1.2–1.8MB
~34K SLoC