diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-12-05 10:27:21 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-01-23 16:51:03 +0300 |
commit | dc51810e08c0f104259146c9c035d255de4f7d1d (patch) | |
tree | 2dba8e8ef9d2af439459b0a72ea85d32bff26a96 /lib/owner.js | |
parent | b5b0e3cde946529e2c86d58cd491f54d7f69c6d3 (diff) |
add 'npm dist-tag {add,del,list}'
Diffstat (limited to 'lib/owner.js')
-rw-r--r-- | lib/owner.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/owner.js b/lib/owner.js index 7b3450833..3d33a932a 100644 --- a/lib/owner.js +++ b/lib/owner.js @@ -6,8 +6,8 @@ owner.usage = "npm owner add <username> <pkg>" var npm = require("./npm.js") , log = require("npmlog") - , readJson = require("read-package-json") , mapToRegistry = require("./utils/map-to-registry.js") + , readLocalPkg = require("./utils/read-local-package.js") owner.completion = function (opts, cb) { var argv = opts.conf.argv.remain @@ -252,14 +252,6 @@ function mutate (pkg, user, mutation, cb) { } } -function readLocalPkg (cb) { - if (npm.config.get("global")) return cb() - var path = require("path") - readJson(path.resolve(npm.prefix, "package.json"), function (er, d) { - return cb(er, d && d.name) - }) -} - function unknown (action, cb) { cb("Usage: \n" + owner.usage) } |