Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

modulemaid

alexstevovich9Apache-2.01.0.0TypeScript support: included

A dependency cleanup tool for Node.js projects, providing a programmatic interface and a CLI command.

string, replace, template, text processing, string substitution, batch replace, multiple replace, replace all, string formatting, templating engine, dynamic content, variable replacement, document templating, content injection, text manipulation

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 (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.