MCPcopy Index your code
hub / github.com/stackblitz-labs/pkg.pr.new / generateShellCommand

Function generateShellCommand

packages/cli/template.ts:3–14  ·  view source on GitHub ↗
(
  url: string,
  isCommentWithDev: boolean,
  selectedPackageManager: ("npm" | "yarn" | "pnpm" | "bun")[],
)

Source from the content-addressed store, hash-verified

1import { installCommands } from "@pkg-pr-new/utils";
2
3function generateShellCommand(
4 url: string,
5 isCommentWithDev: boolean,
6 selectedPackageManager: ("npm" | "yarn" | "pnpm" | "bun")[],
7) {
8 return selectedPackageManager
9 .map(
10 (pm) =>
11 `\`\`\`sh\n${installCommands[pm]} ${url + (isCommentWithDev ? " -D" : "")}\n\`\`\``,
12 )
13 .join("\n");
14}
15
16export const createDefaultTemplate = (
17 dependencies: Record<string, string>,

Callers 1

createDefaultTemplateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected