2017-07-05 96 views

回答

1

他們是同義的。

在GitHub上檢查NPM的源代碼:set命令的代碼很短並且要求configset

https://github.com/npm/npm/blob/master/lib/set.js

module.exports = set 

set.usage = 'npm set <key> <value> (See `npm config`)' 

var npm = require('./npm.js') 

set.completion = npm.commands.config.completion 

function set (args, cb) { 
    if (!args.length) return cb(set.usage) 
    npm.commands.config(['set'].concat(args), cb) 
} 

config命令:https://github.com/npm/npm/blob/master/lib/config.js