#251 talk about this packge.json tip
- Status
- New
- Priority
- Normal
- Assigned to
- Volkan Ozcelik
- Category
- Lessons
- Version
- None
Woah, just learned that in Node, values in package.json are automatically accessible like this:
process.env.npm_package_keyYouWantHere
For example, if you want to read the version key from package.json in your Node script, do this:
process.env.npm_package_version
History
| 22 Jul 2018, 21:36 | Volkan Ozcelik submitted the bug |