Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-03-04 07:26:33 +0300
committerGar <gar+gh@danger.computer>2021-03-09 22:10:06 +0300
commit9fe0df5b5d7606e5841288d9931be6c04767c9ca (patch)
tree50b916523fe4a5ebab6010b137cc931cc2a9ce70 /lib/bugs.js
parent85a8694dd9b4a924a474ba75261914511a216868 (diff)
fix(usage): clean up usage declarations
Small refactor of commands to allow usage to be more programmatically generated, leading us in the direction of more tighly coupling each command to the params it accepts. PR-URL: https://github.com/npm/cli/pull/2821 Credit: @wraithgar Close: #2821 Reviewed-by: @isaacs
Diffstat (limited to 'lib/bugs.js')
-rw-r--r--lib/bugs.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/bugs.js b/lib/bugs.js
index fb0d7c927..1814dd7bc 100644
--- a/lib/bugs.js
+++ b/lib/bugs.js
@@ -1,17 +1,16 @@
const log = require('npmlog')
const pacote = require('pacote')
const openUrl = require('./utils/open-url.js')
-const usageUtil = require('./utils/usage.js')
const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js')
+const BaseCommand = require('./base-command.js')
-class Bugs {
- constructor (npm) {
- this.npm = npm
+class Bugs extends BaseCommand {
+ static get name () {
+ return 'bugs'
}
- /* istanbul ignore next - see test/lib/load-all-commands.js */
- get usage () {
- return usageUtil('bugs', 'npm bugs [<pkgname>]')
+ static get usage () {
+ return ['[<pkgname>]']
}
exec (args, cb) {