Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve cli help menu #294

Merged
merged 12 commits into from
Jan 16, 2025
5 changes: 5 additions & 0 deletions .changeset/sour-tomatoes-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"sv": patch
---

chore: improve cli help menu
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/degit": "^2.8.6",
"@types/ps-tree": "^1.1.6",
"@types/tar-fs": "^2.0.4",
"commander": "^12.1.0",
"commander": "^13.0.0",
"degit": "^2.8.4",
"empathic": "^1.0.0",
"package-manager-detector": "^0.2.7",
Expand Down
8 changes: 7 additions & 1 deletion packages/cli/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ export const helpConfig: HelpConfiguration = {
}

return option.flags;
}
},
styleTitle: (str) => pc.underline(str),
styleCommandText: (str) => pc.red(str),
styleDescriptionText: (str) => pc.gray(str),
styleOptionText: (str) => pc.white(str),
styleArgumentText: (str) => pc.white(str),
styleSubcommandText: (str) => pc.red(str)
};

function formatDescription(arg: Option | Argument): string {
Expand Down
Loading
Loading