blob: b2f731ed55ae99caced0bc8b0ef90e3372e1ec33 (
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.nextTick(cb.bind(this, null, npm.dir))
}
|