1.1.0 • Published 1 year ago

@whoj/manage-pkg v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

manage-pkg

Install / Uninstall package(s) programmatically. Detect package managers automatically (npm, yarn and pnpm). Skips already installed packages. Powered by @antfu/ni

npm i @whoj/manage-pkg

Install Package

import { installPackage } from '@whoj/manage-pkg';

await installPackage('unplugin', { dev: true });

Uninstall Package

import { uninstallPackage } from '@whoj/manage-pkg';

await uninstallPackage('unplugin', { silent: true });

Check if installed or not

import { checkPackageStatus } from '@whoj/manage-pkg';

// This will return false OR package's installed version number
await checkPackageStatus('unplugin');

License

MIT License © 2022 Jonson B.