Skip to content
Permalink
Browse files
docs: added a section for usage with process.env (#14)
added a header for usage with process.env to separate section from 'current lifecycle event' and make it easier to find

PR-URL: #14
Credit: @mwarger
Reviewed-By: @zkat
  • Loading branch information
mwarger authored and zkat committed Aug 7, 2018
1 parent d811461 commit e2346e7702acccefe6d711168c2b0e0e272e194a
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

0 comments on commit e2346e7

Please sign in to comment.