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:
Diffstat (limited to 'lib/base-command.js')
-rw-r--r--lib/base-command.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/base-command.js b/lib/base-command.js
index 8e48caa2e..b8497fd44 100644
--- a/lib/base-command.js
+++ b/lib/base-command.js
@@ -6,6 +6,14 @@ class BaseCommand {
this.npm = npm
}
+ get name () {
+ return this.constructor.name
+ }
+
+ get description () {
+ return this.constructor.description
+ }
+
get usage () {
let usage = `npm ${this.constructor.name}\n\n`
if (this.constructor.description)