diff options
Diffstat (limited to 'lib/view.js')
-rw-r--r-- | lib/view.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/view.js b/lib/view.js index bff7565b8..79c440426 100644 --- a/lib/view.js +++ b/lib/view.js @@ -1,8 +1,5 @@ // npm view [pkg [pkg ...]] - module.exports = view -view.usage = 'npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]' + - '\n\naliases: info, show, v' var npm = require('./npm.js') var readJson = require('read-package-json') @@ -12,6 +9,12 @@ var semver = require('semver') var mapToRegistry = require('./utils/map-to-registry.js') var npa = require('npm-package-arg') var path = require('path') +var usage = require('./utils/usage') + +view.usage = usage( + 'view', + 'npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]' +) view.completion = function (opts, cb) { if (opts.conf.argv.remain.length <= 2) { |