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: 958361d351a4b02183d783b6d22379d4e4a52cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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))
}