diff options
author | Daijiro Wachi <daijiro.wachi@gmail.com> | 2016-04-27 00:04:26 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-04-28 03:29:02 +0300 |
commit | 20125f19b96fd05af63f8c0bd243ffb25780279a (patch) | |
tree | 2959dfe08e30126d3b1682da22091e84f7f65281 /lib/link.js | |
parent | a53feac2647f7dc4245f1700dfbdd1aba8745672 (diff) |
lib: Refactor summary usage to use utils/usage
This also helps by DRYing up our lists of command aliases.
Credit: @watilde
Reviewed-By: @iarna
PR-URL: https://github.com/npm/npm/pull/12485
Diffstat (limited to 'lib/link.js')
-rw-r--r-- | lib/link.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/link.js b/lib/link.js index 7ee518419..3624a16c9 100644 --- a/lib/link.js +++ b/lib/link.js @@ -10,12 +10,15 @@ var chain = require('slide').chain var path = require('path') var build = require('./build.js') var npa = require('npm-package-arg') +var usage = require('./utils/usage') module.exports = link -link.usage = 'npm link (in package dir)' + - '\nnpm link [<@scope>/]<pkg>[@<version>]' + - '\n\nalias: npm ln' +link.usage = usage( + 'link', + 'npm link (in package dir)' + + '\nnpm link [<@scope>/]<pkg>[@<version>]' +) link.completion = function (opts, cb) { var dir = npm.globalDir |