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: 409b20b785000ec27ba2bbdfaf975c6bd134d5c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
module.exports = root

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

root.usage = "npm root\nnpm root -g\n(just prints the root folder)"

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