Skip to content

Commit

Permalink
A little bit refactoring more
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Sep 10, 2024
1 parent 64fca5d commit ca79f3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/executable/setup/PackageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import path from "path";
import { CommandExecutor } from "./CommandExecutor";
import { FileRetriever } from "./FileRetriever";

const managers = ["npm", "pnpm", "yarn", "bun"] as const;
type Manager = (typeof managers)[number];

export class PackageManager {
public manager: Manager = "npm";
public get file(): string {
Expand Down Expand Up @@ -72,12 +69,15 @@ export namespace Package {
}
}

type Manager = "npm" | "pnpm" | "yarn" | "bun";

const installCmdTable = {
npm: "install",
pnpm: "add",
yarn: "add",
bun: "add",
} as const satisfies Record<Manager, string>;

const devOptionTable = {
npm: "--save-dev",
pnpm: "--save-dev",
Expand Down

0 comments on commit ca79f3a

Please sign in to comment.