blob: 0c748199979e8db2450bc6a457e9a379d4d0cf46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module.exports = publish
var npm = require("../npm")
, registry = require("./utils/registry")
, log = require("./utils/log")
function publish (args, cb) {
if (args.length === 0) args = ["."]
log.verbose(args, "publish")
npm.commands.cache.add(args[0], args[1], function (er, data) {
if (er) return cb(er)
log.verbose(data, "publish")
if (!data) return cb(new Error("no data!?"))
registry.publish(data, cb)
})
}
|