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-22 18:14:08 +0300
committerisaacs <i@izs.me>2011-03-22 18:28:15 +0300
commit2ff760b6a45e990dd8662703f3f89328c884d256 (patch)
tree099cace73042c2cee0077e4759646bfca7f11f29 /lib/bin.js
parentdb1d55f45c74693d45dd9e2f4e1a36de68e4e222 (diff)
Where does npm install executables?
Diffstat (limited to 'lib/bin.js')
-rw-r--r--lib/bin.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/bin.js b/lib/bin.js
new file mode 100644
index 000000000..6a9adfd9b
--- /dev/null
+++ b/lib/bin.js
@@ -0,0 +1,11 @@
+module.exports = bin
+
+var npm = require("../npm")
+ , output = require("./utils/output")
+
+function bin (args, cb) {
+ var path = require("path")
+ , global = npm.config.get("global")
+ , b = global ? path.join(npm.prefix, "bin") : path.join(npm.dir, ".bin")
+ output.write(b, cb)
+}