summaryrefslogtreecommitdiff
path: root/deps/npm/man/man1/npm-root.1
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/man/man1/npm-root.1')
-rw-r--r--deps/npm/man/man1/npm-root.111
1 files changed, 11 insertions, 0 deletions
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index b7c2fba376..e1ba4ef6ca 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -11,6 +11,17 @@ npm root [\-g]
.SS Description
.P
Print the effective \fBnode_modules\fP folder to standard out\.
+.P
+Useful for using npm in shell scripts that do things with the
+\fBnode_modules\fP folder\. For example:
+.P
+.RS 2
+.nf
+#!/bin/bash
+global_node_modules="$(npm root \-\-global)"
+echo "Global packages installed in: ${global_node_modules}"
+.fi
+.RE
.SS See Also
.RS 0
.IP \(bu 2