Skip to content

Commit

Permalink
docs: added a section for usage with process.env (#14)
Browse files Browse the repository at this point in the history
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 e2346e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/misc/npm-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e2346e7

Please sign in to comment.