1.0.0 • Published 4 months ago

modulemaid v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

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 (removes devDependencies).
  • all → Runs npm uninstall on all dependencies.
  • skipSkips 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.