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

feat(cli): add command option aliases #818

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/cli-e2e/tests/__snapshots__/help.e2e.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Global Options:
.(ts|mjs|js). [string]
--tsconfig Path to a TypeScript config, to be used when loading config
file. [string]
--onlyPlugins List of plugins to run. If not set all plugins are run.
-p, --onlyPlugins List of plugins to run. If not set all plugins are run.
[array] [default: []]
--skipPlugins List of plugins to skip. If not set all plugins are run.
-P, --skipPlugins List of plugins to skip. If not set all plugins are run.
[array] [default: []]

Persist Options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const onlyPluginsOption: Options = {
type: 'array',
default: [],
coerce: coerceArray,
alias: 'p',
};

export function yargsOnlyPluginsOptionsDefinition(): Record<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const skipPluginsOption: Options = {
type: 'array',
default: [],
coerce: coerceArray,
alias: 'P',
};

export function yargsSkipPluginsOptionsDefinition(): Record<
Expand Down