drop-npm-deps
v1.0.1
Published
Removes all node_modules from specified/current folder
Readme
clean-module
A CLI tool that recursively finds and deletes all node_modules directories under a given path (or the current directory).
Usage
node clean.js [path]path— optional target directory (defaults to current working directory)
Example:
node clean.js ~/projectsThis will scan ~/projects for every package.json, then delete the adjacent node_modules folder (if it exists), up to 5 deletions in parallel.
How it works
- Streams all
package.jsonfiles under the target path, skipping any insidenode_modules. - For each found package, checks whether a sibling
node_modulesfolder exists. - Deletes confirmed
node_modulesfolders concurrently (max 5 at a time). - Logs each found package and each deletion to stdout, ending with
Done!.
Dependencies
| Package | Purpose |
| --------------------------------------------- | ---------------------------------------------------------------- |
| glob | Stream-based file globbing |
| kefir | Reactive streams / FRP |
| lodash | Functional utilities (fp/pipe, fp/partialRight, fp/always) |
Install
npm installLicense
ISC
