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
path: root/doc
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2014-05-24 02:21:09 +0400
committerisaacs <i@izs.me>2014-05-24 02:26:11 +0400
commitbb34bf2737d0ab57ce1140501f5d303b29de6308 (patch)
tree26c47f685f30d08042dbf6a76e56abba85237ede /doc
parented3abf1aa10000f0f687330e976d78d1955557f6 (diff)
doc per-project .npmrc file
Diffstat (limited to 'doc')
-rw-r--r--doc/files/npmrc.md14
-rw-r--r--doc/misc/npm-config.md3
2 files changed, 15 insertions, 2 deletions
diff --git a/doc/files/npmrc.md b/doc/files/npmrc.md
index e65f722fd..ba57a6f2c 100644
--- a/doc/files/npmrc.md
+++ b/doc/files/npmrc.md
@@ -13,8 +13,9 @@ For a list of available configuration options, see npm-config(7).
## FILES
-The three relevant files are:
+The four relevant files are:
+* per-project config file (/path/to/my/project/.npmrc)
* per-user config file (~/.npmrc)
* global config file ($PREFIX/npmrc)
* npm builtin config file (/path/to/npm/npmrc)
@@ -29,6 +30,17 @@ Each of these files is loaded, and config options are resolved in
priority order. For example, a setting in the userconfig file would
override the setting in the globalconfig file.
+### Per-project config file
+
+When working locally in a project, a `.npmrc` file in the root of the
+project (ie, a sibling of `node_modules` and `package.json`) will set
+config values specific to this project.
+
+Note that this only applies to the root of the project that you're
+running npm in. It has no effect when your module is published. For
+example, you can't publish a module that forces itself to install
+globally, or in a different location.
+
### Per-user config file
`$HOME/.npmrc` (or the `userconfig` param, if set in the environment
diff --git a/doc/misc/npm-config.md b/doc/misc/npm-config.md
index 4792d808f..b49e98736 100644
--- a/doc/misc/npm-config.md
+++ b/doc/misc/npm-config.md
@@ -24,8 +24,9 @@ same.
### npmrc Files
-The three relevant files are:
+The four relevant files are:
+* per-project config file (/path/to/my/project/.npmrc)
* per-user config file (~/.npmrc)
* global config file ($PREFIX/npmrc)
* npm builtin config file (/path/to/npm/npmrc)