blob: 8cfb259a81323b4f7b4de319675316789096bc72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
const BaseCommand = require('./base-command.js')
class Get extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Get a value from the npm configuration'
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'get'
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['[<key> ...] (See `npm config`)']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
async completion (opts) {
return this.npm.commands.config.completion(opts)
}
exec (args, cb) {
this.npm.commands.config(['get'].concat(args), cb)
}
}
module.exports = Get
|