Skip to content

Commit

Permalink
feat: add aliases to all available commands (#1644)
Browse files Browse the repository at this point in the history
* feat: show up command aliases as part of help info

* feat: add aliases for all available commands

* refactor: remove ternary
  • Loading branch information
jamesgeorge007 committed Jun 23, 2020
1 parent ee54d30 commit 9352027
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/webpack-cli/lib/groups/HelpGroup.js
Expand Up @@ -102,8 +102,8 @@ class HelpGroup {
},
{
header: 'Available Commands',
content: options.commands.map((e) => {
return { name: e.name, summary: e.description };
content: options.commands.map((cmd) => {
return { name: `${cmd.name} | ${cmd.alias}`, summary: cmd.description };
}),
},
{
Expand Down
3 changes: 3 additions & 0 deletions packages/webpack-cli/lib/utils/cli-flags.js
Expand Up @@ -26,6 +26,7 @@ module.exports = {
},
{
name: 'migrate',
alias: 'm',
type: String,
usage: 'migrate',
description: 'Migrate a configuration to a new version',
Expand All @@ -49,6 +50,7 @@ module.exports = {
{
name: 'info',
scope: 'external',
alias: 'i',
type: String,
usage: 'info [options]',
description: 'Outputs information about your system and dependencies',
Expand All @@ -63,6 +65,7 @@ module.exports = {
},
{
name: 'serve',
alias: 's',
scope: 'external',
type: String,
usage: 'serve',
Expand Down

0 comments on commit 9352027

Please sign in to comment.