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

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

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

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

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