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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-03-11 02:45:55 +0300
committerisaacs <i@izs.me>2011-03-22 01:56:00 +0300
commitd71c482a4c6fbccfe27fe8a2e876a5881e2dbcd3 (patch)
tree49c5130632c11d154adca93800396df77c4fd7ad /lib/prefix.js
parentde3dcfa34ffa04c14e03248c34c4af6ebf1249c7 (diff)
Add an 'npm prefix' command to get the prefix
Diffstat (limited to 'lib/prefix.js')
-rw-r--r--lib/prefix.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/prefix.js b/lib/prefix.js
new file mode 100644
index 000000000..aebe1993a
--- /dev/null
+++ b/lib/prefix.js
@@ -0,0 +1,8 @@
+module.exports = prefix
+
+var npm = require("../npm")
+ , output = require("./utils/output")
+
+function prefix (args, cb) {
+ output.write(npm.config.get("outfd"), npm.prefix, cb)
+}