@korautils/peer-deps
v1.0.4
Published
A utility library designed to resolve peer dependency requirements for other packages. This tool simplifies the process of managing peer dependencies, ensuring compatibility and ease of use.
Downloads
15
Maintainers
Readme
@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.jsonfiles of the packages innode_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
npm install --save-dev @korautils/peer-depsUsing yarn
yarn add --dev @korautils/peer-depsUsing pnpm
pnpm add --save-dev @korautils/peer-depsAlternatively, you can use the tool directly with npx without installing it globally:
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.
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:
npx @korautils/peer-deps react react-domThis 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: [email protected]
- GitHub: johnjaider1000
