diff options
author | Gar <gar+gh@danger.computer> | 2021-03-19 21:56:18 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-03-22 20:17:57 +0300 |
commit | b876442241b9d366a0541714bbee1ae50d6746fd (patch) | |
tree | a4849bd374d9786f6c7d2ae4e4c74c62d0c35db8 /lib/adduser.js | |
parent | 629aaf394c4fa01b79a77d43489baca6492bce9a (diff) |
fix(usage): tie usage to config
This starts us down the path of tying the params our commands accept to
their config items. For now it is optional, and not every current
config item would cleanly render if we added them today.
The ones that are added here DO render nicely, and we can iterate from
here. We can also at a later date do the same kind of appraoch with our
positional args.
PR-URL: https://github.com/npm/cli/pull/2908
Credit: @wraithgar
Close: #2908
Reviewed-by: @nlf, @isaacs
Diffstat (limited to 'lib/adduser.js')
-rw-r--r-- | lib/adduser.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/adduser.js b/lib/adduser.js index f761ae386..f35b9829f 100644 --- a/lib/adduser.js +++ b/lib/adduser.js @@ -17,8 +17,12 @@ class AddUser extends BaseCommand { return 'adduser' } - static get usage () { - return ['[--registry=url] [--scope=@orgname] [--always-auth]'] + static get params () { + return [ + 'registry', + 'scope', + 'always-auth', + ] } exec (args, cb) { |