Find Package Manager Type
Find what package manager is used in the provided path.
import { findPackageManagerType } from '@capgo/find-package-manager'
console.log(findPackageManagerType())
console.log(findPackageManagerType('../.'))
console.log(findPackageManagerType('.', 'npm'))
Find the install command for the package manager.
import { findInstallCommand } from '@capgo/find-package-manager'
console.log(findInstallCommand())
console.log(findInstallCommand(findPackageManagerType()))
console.log(findInstallCommand(findPackageManagerType(), true))
Find the package runner command.
import { findPackageManagerRunner } from '@capgo/find-package-manager'
console.log(findPackageManagerRunner())
console.log(findPackageManagerRunner('../.'))
console.log(findPackageManagerRunner('.', 'yarn'))