]> gerrit.simantics Code Review - simantics/district.git/blob - root.js
b2f731ed55ae99caced0bc8b0ef90e3372e1ec33
[simantics/district.git] / root.js
1 module.exports = root
2
3 var npm = require("./npm.js")
4
5 root.usage = "npm root\nnpm root -g\n(just prints the root folder)"
6
7 function root (args, silent, cb) {
8   if (typeof cb !== "function") cb = silent, silent = false
9   if (!silent) console.log(npm.dir)
10   process.nextTick(cb.bind(this, null, npm.dir))
11 }