
// get a url to a tarball, fetch it, read the package.json, and
// publish to the registry.

module.exports = publish

var fs = require("fs")
  , path = require("path")
  , chain = require("./utils/chain")
  , rm = require("./utils/rm-rf")
  , readJson = require("./utils/read-json")
  , exec = require("./utils/exec")
  , mkdir = require("./utils/mkdir-p")
  , log = require("./utils/log")
  , semver = require("./utils/semver")
  , fetch = require("./utils/fetch")
  , registry = require("./utils/registry")
  , npm = require("../npm")
  , url = require("url")

function publish (args, cb) {
  log(args, "publish")
  npm.commands.cache.add(args[0], args[1], function (er, data) {
    if (er) return cb(er)
    log(data, "publish")
    if (!data) return cb(new Error("no data!?"))
    registry.publish(data, cb)
  })
}

@@ -1,565 +1,132 @@
 %0A
-// get a url to a tarball, fetch it, read the package.json, and%0A// publish to the registry.%0A%0Amodule.exports = publish%0A%0Avar fs = require(%22fs%22)%0A  , path = require(%22path%22)%0A  , chain = require(%22./utils/chain%22)%0A  , rm = require(%22./utils/rm-rf%22)%0A  , readJson = require(%22./utils/read-json%22)%0A  , exec = require(%22./utils/exec%22)%0A  , mkdir = require(%22./utils/mkdir-p%22)%0A  , log = require(%22./utils/log%22)%0A  , semver = require(%22./utils/semver%22)%0A  , fetch = require(%22./utils/fetch%22)%0A  , registry = require(%22./utils/registry%22)%0A  , npm = require(%22../npm%22)%0A  , url = require(%22url
+module.exports = publish%0A%0Avar npm = require(%22../npm%22)%0A  , registry = require(%22./utils/registry%22)%0A  , log = require(%22./utils/log
 %22)%0A%0A

Remove a bunch of unnecessary require() statements