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/config.js')
-rw-r--r--lib/config.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/config.js b/lib/config.js
index 65bd9fece..80958ec5f 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -1,14 +1,5 @@
-
module.exports = config
-config.usage = 'npm config set <key> <value>' +
- '\nnpm config get [<key>]' +
- '\nnpm config delete <key>' +
- '\nnpm config list' +
- '\nnpm config edit' +
- '\nnpm set <key> <value>' +
- '\nnpm get [<key>]'
-
var log = require('npmlog')
var npm = require('./npm.js')
var npmconf = require('./config/core.js')
@@ -19,7 +10,18 @@ var ini = require('ini')
var editor = require('editor')
var os = require('os')
var umask = require('./utils/umask')
+var usage = require('./utils/usage')
+config.usage = usage(
+ 'config',
+ 'npm config set <key> <value>' +
+ '\nnpm config get [<key>]' +
+ '\nnpm config delete <key>' +
+ '\nnpm config list' +
+ '\nnpm config edit' +
+ '\nnpm set <key> <value>' +
+ '\nnpm get [<key>]'
+)
config.completion = function (opts, cb) {
var argv = opts.conf.argv.remain
if (argv[1] !== 'config') argv.unshift('config')