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/star.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/star.js')
-rw-r--r-- | lib/star.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/star.js b/lib/star.js index 29c4037d0..ce141688b 100644 --- a/lib/star.js +++ b/lib/star.js @@ -4,9 +4,13 @@ var npm = require('./npm.js') var log = require('npmlog') var asyncMap = require('slide').asyncMap var mapToRegistry = require('./utils/map-to-registry.js') +var usage = require('./utils/usage') -star.usage = 'npm star [<pkg>...]\n' + - 'npm unstar [<pkg>...]' +star.usage = usage( + 'star', + 'npm star [<pkg>...]\n' + + 'npm unstar [<pkg>...]' +) star.completion = function (opts, cb) { // FIXME: there used to be registry completion here, but it stopped making |