Skip to content

Commit

Permalink
fix: show bun option only on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
rsaz committed Sep 27, 2023
1 parent 9a6593e commit 2e665e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@expressots/boost-ts": "^1.1.1",
"chalk-animation": "^1",
"cli-progress": "^3.11.2",
"degit": "^2.8.4",
"glob": "^10.2.6",
"inquirer": "^8.0.0",
"mustache": "^4.2.0",
"ts-node": "^10.9.1",
"yargs": "^17.6.2"
"@expressots/boost-ts": "1.1.1",
"chalk-animation": "2.0.3",
"cli-progress": "3.11.2",
"degit": "2.8.4",
"glob": "10.2.6",
"inquirer": "8.0.0",
"mustache": "4.2.0",
"ts-node": "10.9.1",
"yargs": "17.6.2"
},
"devDependencies": {
"@commitlint/cli": "^17.7.1",
Expand Down
8 changes: 7 additions & 1 deletion src/new/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import { projectForm } from "./form";
type CommandModuleArgs = {};

const createProject = (): CommandModule<CommandModuleArgs, any> => {
const packageManagers: Array<string> = ["npm", "yarn", "pnpm"];

if (process.platform !== "win32") {
packageManagers.push("bun");
}

return {
command: "new <project-name> [package-manager] [template] [directory]",
describe: "Create a new project",
Expand All @@ -23,7 +29,7 @@ const createProject = (): CommandModule<CommandModuleArgs, any> => {
.option("package-manager", {
describe: "The package manager to use",
type: "string",
choices: ["npm", "yarn", "pnpm", "bun"],
choices: packageManagers,
alias: "p",
})
.option("directory", {
Expand Down

0 comments on commit 2e665e3

Please sign in to comment.