mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-23 09:31:52 -04:00
feat(why): implement shorthands for "--dev" & "--prod" options (#3158)
close #3153
This commit is contained in:
5
.changeset/giant-tigers-smoke.md
Normal file
5
.changeset/giant-tigers-smoke.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-listing": patch
|
||||
---
|
||||
|
||||
Implement shorthands for "--dev" & "--prod" options of `why` command
|
||||
@@ -25,6 +25,11 @@ export const cliOptionsTypes = () => ({
|
||||
recursive: Boolean,
|
||||
})
|
||||
|
||||
export const shorthands = {
|
||||
D: '--dev',
|
||||
P: '--production',
|
||||
}
|
||||
|
||||
export const commandNames = ['why']
|
||||
|
||||
export function help () {
|
||||
@@ -63,10 +68,12 @@ For options that may be used with `-r`, see "pnpm help recursive"',
|
||||
{
|
||||
description: 'Display only the dependency graph for packages in `dependencies` and `optionalDependencies`',
|
||||
name: '--prod',
|
||||
shortAlias: '-P',
|
||||
},
|
||||
{
|
||||
description: 'Display only the dependency graph for packages in `devDependencies`',
|
||||
name: '--dev',
|
||||
shortAlias: '-D',
|
||||
},
|
||||
{
|
||||
description: "Don't display packages from `optionalDependencies`",
|
||||
|
||||
Reference in New Issue
Block a user