DEV Community

Japroz Saini
Japroz Saini

Posted on

Nmr

Nmr

Nmr (Node Module Resolver) - A CLI to prevent you from downloading packages again & again | Product Hunt

Nmr (Node module resolver) is a command line utility that stores npm modules in a safe place and prevetn your from installing the same module for different projects again and again.

Aim

nmr is aimed for reducing the space hogged by the node_modules folder in ever node.js project.

Installation

To install nmr, enter the following command in the terminal:

npm install -g @svel-ai/nmr@latest
Enter fullscreen mode Exit fullscreen mode

Usage

To use nmr you have to install package globally, and then add them to your project.

For example, if you want to use the commander module in your project, you will have to install the commander module to your system through the following command:

nmr install commander
Enter fullscreen mode Exit fullscreen mode

The above command can be run form anywhere in the terminal.

To use the module in your project, run the following command inside of your project directory:

npm init -y
nmr add commander
Enter fullscreen mode Exit fullscreen mode

That's it. Your ready to use commander. You can use it in your project and import it normally

const { program } = require("commander");
// import { program } from "commander" // If you are using ES6 syntax
// ...
Enter fullscreen mode Exit fullscreen mode

Contributing

We love adding new features to our projects. If you have a new idea, a new bug report or a feature request, please feel free to create a new issue and explain.

License : MIT

Top comments (0)