Welcome to mirror list, hosted at ThFree Co, Russian Federation.

root.js « lib - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9310bda92d088b635a79955650294c9389b7aa84 (plain)
1
2
3
4
5
6
7
8
9
10
11
module.exports = root

var npm = require("./npm.js")

root.usage = "npm root [-g]"

function root (args, silent, cb) {
  if (typeof cb !== "function") cb = silent, silent = false
  if (!silent) console.log(npm.dir)
  process.nextTick(cb.bind(this, null, npm.dir))
}