Skip to content

Commit

Permalink
feat: support multiple aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
favoyang committed Apr 25, 2020
1 parent 5d440ff commit 43311bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ program

program
.command("add <pkg> [otherPkgs...]")
.alias("install")
.aliases(["install", "i"])
.description(
`add package to manifest json
openupm add <pkg> [otherPkgs...]
Expand All @@ -36,7 +36,7 @@ openupm add <pkg>@<version> [otherPkgs...]`

program
.command("remove <pkg> [otherPkgs...]")
.alias("rm")
.aliases(["rm", "uninstall"])
.description("remove package from manifest json")
.action(async function(pkg, otherPkgs, options) {
const pkgs = [pkg].concat(otherPkgs);
Expand All @@ -46,7 +46,7 @@ program

program
.command("search <keyword>")
.alias("s")
.aliases(["s", "se", "find"])
.description("Search package by keyword")
.action(async function(keyword, options) {
const retCode = await search(keyword, options);
Expand All @@ -55,7 +55,7 @@ program

program
.command("view <pkg>")
.alias("v")
.aliases(["v", "info", "show"])
.description("view package information")
.action(async function(pkg, options) {
const retCode = await view(pkg, options);
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"cli-table": "^0.3.1",
"commander": "^4.1.1",
"commander": "^5.1.0",
"is-ip": "^3.1.0",
"key-file-storage": "^2.2.8",
"lodash": "^4.17.15",
Expand Down

0 comments on commit 43311bc

Please sign in to comment.