@reliverse/rse
Version:
@reliverse/rse is your all-in-one companion for bootstrapping and improving any kind of projects (especially web apps built with frameworks like Next.js) — whether you're kicking off something new or upgrading an existing app. It is also a little AI-power
21 lines (20 loc) • 437 B
JavaScript
import { exec } from "child_process";
function checkCommand(command) {
return new Promise((resolve) => {
exec(`${command} --version`, (error) => {
if (error) {
resolve(false);
} else {
resolve(true);
}
});
});
}
export async function checkPackageManagers() {
const hasPnpm = await checkCommand("pnpm");
const hasBun = await checkCommand("bun");
return {
hasPnpm,
hasBun
};
}