modulemaid
v1.0.0
Published
A dependency cleanup tool for Node.js projects, providing a programmatic interface and a CLI command.
Downloads
138
Maintainers
Readme
modulemaid
ModuleMaid is a dependency cleanup tool for Node.js projects, providing a programmatic interface and a CLI command.
Features
- Easy configuration.
- Can remove dev dependencies, all dependencies or nothing, configurable per package.
- Can work recursively to clear out nested repos.
Install
npm install modulemaid
Usage
Programmatic API
import { moduleMaid } from 'modulemaid';
moduleMaid({
dir: './projects',
recursive: true,
defaultMode: 'dev',
});
CLI Usage
modulemaid -d ./projects --recursive --mode dev
Modes
- dev → Runs
npm prune --production
(removesdevDependencies
). - all → Runs
npm uninstall
on all dependencies. - skip → Skips cleanup for this package.
By default, all packages use the defaultMode
, but each package can override it in their package.json
:
package.json example
"modulemaid": {
"mode": "all"
}
Development Homepage:
https://github.com/alexstevovich/modulemaid
This link might become modulemaid-node in the future if conflicts arise.
License
Licensed under the Apache License 2.0.