MCPcopy Create free account
hub / github.com/craftreactnative/ui / getInstallCommand

Function getInstallCommand

cli/src/commands/init.ts:285–297  ·  view source on GitHub ↗
(
  packageManager: "npm" | "yarn" | "pnpm",
  packageName: string
)

Source from the content-addressed store, hash-verified

283}
284
285function getInstallCommand(
286 packageManager: "npm" | "yarn" | "pnpm",
287 packageName: string
288): string {
289 switch (packageManager) {
290 case "yarn":
291 return `yarn add ${packageName}`;
292 case "pnpm":
293 return `pnpm add ${packageName}`;
294 default:
295 return `npm install ${packageName}`;
296 }
297}
298
299async function addUnistylesImport(targetPath: string): Promise<void> {
300 const possibleEntryFiles = ["App.tsx", "app/_layout.tsx", "index.tsx"];

Callers 1

installDependencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected