UNPKG

@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

24 lines (23 loc) 661 B
import { re } from "@reliverse/relico"; import { relinka } from "@reliverse/relinka"; import { spinner } from "@reliverse/rempts"; import { $ } from "execa"; export async function installDependencies({ projectDir, packageManager }) { const s = spinner(); try { s.start(`Running ${packageManager} install...`); await $({ cwd: projectDir, stderr: "inherit" })`${packageManager} install`; s.stop("Dependencies installed successfully"); } catch (error) { s.stop(re.red("Failed to install dependencies")); if (error instanceof Error) { relinka("error", re.red(`Installation error: ${error.message}`)); } } }