Skip to content

Latest commit

 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Modules Garbage Cleaner

This module allows you to remove lock files (package-lock.json, yarn.lock, pnpm-lock.yaml) and node_modules from your project. It also provides a clean installation of your dependencies using npm, yarn, or pnpm.

npm version MIT License NodeJS install size npm downloads

Compatibility

The minimum supported version of Node.js is v6.

Usage

Installation

npm i -g nmgc

Or use with npx

npx nmgc <COMMAND> [OPTIONS]

Commands

USAGE:
    nmgc <COMMAND> [OPTIONS]

COMMAND
    h, help     show general help
    r, remove   remove lock files (package-lock.json, yarn.lock, pnpm-lock.yaml) and node_modules
    i, install  clean dependencies and install them from package.json

OPTIONS:
    -f, --force  force the installation
    --npm        use npm package manager
    --yarn       use yarn package manager
    --pnpm       use pnpm package manager

NOTE: If no package manager is specified, it will auto-detect based on lock files.

Examples

# Remove lock files and node_modules
$ nmgc remove

# Clean install with auto-detection
$ nmgc install

# Clean install using yarn
$ nmgc install --yarn

# Clean install using pnpm
$ nmgc install --pnpm

# Install a specific package with npm
$ nmgc install express

# Install a specific package with yarn
$ nmgc install lodash --yarn

License

MIT

About

Remove the node_module and reinstall your npm packages in an easy way

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages