# @korautils/peer-deps

A utility library for handling peer dependencies in Node.js projects. This library automates the process of installing main packages along with their peer dependencies, ensuring that you don't miss any required dependencies during package installation.

## Features

- Detects the package manager (npm, yarn, or pnpm) based on lock files.
- Installs both main packages and their peer dependencies.
- Automatically handles missing peer dependencies by reading them from the respective `package.json` files of the packages in `node_modules`.

## Installation

This library is meant to be used within your private project, so it's accessible publicly but not part of an open-source repository.

To install this library, use one of the following commands depending on your package manager:

### Using npm
```bash
npm install --save-dev @korautils/peer-deps
```

### Using yarn
```bash
yarn add --dev @korautils/peer-deps
```

### Using pnpm
```bash
pnpm add --save-dev @korautils/peer-deps
```

Alternatively, you can use the tool directly with npx without installing it globally:
```bash
npx @korautils/peer-deps [package-names]
```

# Usage
You can use this utility to install packages along with their peer dependencies directly from the command line.
```bash
npx @korautils/peer-deps [package-names]
```

  -	[package-names] should be a list of the main packages you want to install (e.g., react, react-dom).
  -	The tool will detect your package manager (npm, yarn, or pnpm) and install the packages along with any required peer dependencies automatically.

### Example:
```bash
npx @korautils/peer-deps react react-dom
```

This will:
  -	Install react and react-dom using your detected package manager.
  -	Automatically install any missing peer dependencies for react and react-dom.

# License
This library is licensed under the MIT License.

# Author
- John Jaider Vanegas
- Email: jhonjaider100015@gmail.com
- GitHub: [johnjaider1000](https://github.com/johnjaider1000)
