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:
Diffstat (limited to 'doc/misc/npm-scripts.md')
-rw-r--r--doc/misc/npm-scripts.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/misc/npm-scripts.md b/doc/misc/npm-scripts.md
index 259bf28a6..e4b90096a 100644
--- a/doc/misc/npm-scripts.md
+++ b/doc/misc/npm-scripts.md
@@ -143,7 +143,9 @@ The package.json fields are tacked onto the `npm_package_` prefix. So,
for instance, if you had `{"name":"foo", "version":"1.2.5"}` in your
package.json file, then your package scripts would have the
`npm_package_name` environment variable set to "foo", and the
-`npm_package_version` set to "1.2.5"
+`npm_package_version` set to "1.2.5". You can access these variables
+in your code with `process.env.npm_package_name` and
+`process.env.npm_package_version`, and so on for other fields.
### configuration