qpind
qpind copied to clipboard
📦 Quick programmatically install npm dependencies
qpind
Install dependecies quick & programmatically 📦
⚠️ This project is archived ⚠️ Use antfu/install-pkg instead |
Install
# Using npm:
npm install qpind
# Using yarn:
yarn add qpind
Usage
installPackage(packages, fallbackToNpm?, packageManager?, cwd?)
Install dependencies in your root directory, if no package manager is defined it will try to detect one of the following:
- yarn
- npm
- pnpm
// CommonJS
const { installPackage } = require("qpind");
// ESM
import { installPackage } from "qpind";
installPackage("package-name");
detectPackageManager(fallbackToNpm?, cwd?)
Detect the current Package Manager in the directory
const { detectPackageManager } = require("qpind");
var packeManager = detectPackageManager();
// -> yarn || npm || pnpm
License
MIT - Made with ❤️ by Conner Luka Bachmann