{"name":"dotenv-defaults","version":"2.0.0","description":"dotenv... but with defaults!","main":"src/index.js","scripts":{"test":"jest","lint":"standard","travis":"npm run lint && npm t"},"repository":{"type":"git","url":"git+https://github.com/mrsteele/dotenv-defaults.git"},"keywords":["dotenv","defaults","extension","env","default","fallback"],"author":{"name":"Matt Steele","email":"matt@omnionline.us","url":"http://omnionline.us/"},"license":"MIT","bugs":{"url":"https://github.com/mrsteele/dotenv-defaults/issues"},"homepage":"https://github.com/mrsteele/dotenv-defaults#readme","dependencies":{"dotenv":"^8.2.0"},"devDependencies":{"jest":"^25.0.0","standard":"^13.0.1"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"gitHead":"81b7b5d0c026b3eea8bc61b9694a500f30399004","_id":"dotenv-defaults@2.0.0","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-8X8gQoM+BH0L/v+GwgpeNwrthbG2uTDVr3vkbedQPLrIalZE0vxB9LbuD+7echbiP7fAY3tE+pZI11R1DtlUNg==","shasum":"f48577d885c7755d2a4ce1f7f3706552c0cb367e","tarball":"http://registry-npm.ywwl.com/dotenv-defaults/download/dotenv-defaults-2.0.0.tgz","fileCount":6,"unpackedSize":7212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8MH6CRA9TVsSAnZWagAA5jwP/1hHSC1oy8kINnwhh/EI\nULeifx9kPVX4Ppao1YXGHxrr5rKWBgsacZ66WpWWjB2A4e1UX3zCFmb9yyk6\nfvhRITa0lgyZD8snkITIjiEDT2x6G5SsuOZMluZVQIai773VkLFbNQZ7btIw\nIe69lk7M1b/HMlKpbn/tOLRr8Tn5unIRYOn1EeCdzTlvNcN54MZ6OsGVXq8G\nwpVxXS2Dc8Mj4zvwthHq+pU3zo9zOQLIqmqKcyFLv8N8T8t3tpUrbt/BUqf6\nnbPbM8dQfHBhlIWJ5xNDAS0qW5nrcEz8i+KiRzCm0qlMDwUwWQIAs0D+II7Z\nNvB8GLS8iqEaKzCoBif1Cdmf2bvZdxv4hVWGa6eQ9Y9vm7INhxDG4lEx42ee\nDLxPDOWcJ7/iVoWgZYfxVrn1d7gbKrAcSOKnAyddMtPjvw6B2xTV/9lcoIr1\nLquxiYhHzISb/OPqZ8I6cPJI8qWn6d/34KQrqc9lWJILattfge7DBDToj1c/\ny1ei/4v/DVLt3PT55ajkJOvt3Wy0JywdtScMFDqMP/gBg0gUtTmzGO/yczqE\nT8l8OGQWzvz/WoMvfHJZnjBtYeG9AHOT4561m0Si8NCHyEj4q0oVFEATc49z\nk66CK8SwX6Uery6gCHazFshFdunwb0chgD9/Tr2gkor21Ijgind3jU9m6JXa\njvEf\r\n=dH82\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqZnpUtH8o/CZaN2rsxjvthrwcMF1vtC8MHTDlbf69OQIhAJU5BqVrI1DNyPdHIpfvCujMRYY39eLony9B8O3Qe3oy"}],"size":3098,"noattachment":false,"key":"/dotenv-defaults/-/dotenv-defaults-2.0.0.tgz"},"maintainers":[{"name":"mrsteele","email":"matt@omnionline.us"}],"_npmUser":{"name":"mrsteele","email":"matt@omnionline.us"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-defaults_2.0.0_1592836602111_0.7790549480901532"},"_hasShrinkwrap":false,"readme":"# dotenv-defaults\n\nA dotenv system that supports defaults.\n\n### Status\n\n![npm](https://img.shields.io/npm/v/dotenv-defaults.svg)\n[![Main](https://github.com/mrsteele/dotenv-defaults/actions/workflows/main.yml/badge.svg)](https://github.com/mrsteele/dotenv-defaults/actions/workflows/main.yml)\n[![dotenv-vault](https://badge.dotenv.org/works-with.svg?r=3)](https://www.dotenv.org/get-started?r=3)\n\n### Installation\n\nUse the following to install this module:\n\n```\nnpm i dotenv-defaults --save\n```\n\n### Usage\n\nThis module supports all the features from the original [dotenv](https://www.npmjs.com/package/dotenv) module, so usage should be simple enough:\n\n```\n# .env.defaults, safe to commit\nHOST=website.com\nEMAIL=test@email.com\n```\n\n```\n# .env, DO NOT COMMIT\nHOST=mrsteele.dev\n```\n\nThe result\n\n```js\nrequire('dotenv-defaults').config()\n\n// Or you can also load it directly like this\nrequire('dotenv-defaults/config')\n\nconsole.log(process.env.HOST)\n// Outputs: mrsteele.dev\n\nconsole.log(process.env.EMAIL)\n// Outputs: test@email.com\n```\n\n##### TypeScript\nSince this module does not provide TypeScript Type Definitions if you try to import it like `import dotenv from \"dotenv-defaults\"` TypeScript will return an error.\n\nInstead you should load it like this:\n```typescript\nimport \"dotenv-defaults/config\"\n```\n\n##### CLI\nYou can also call this module directly when using the node executable.\nSo, for example if you are running a custom script with node and you want to load your environment variables you can do the following `node -r dotenv-defaults/config your-script.js`. (_When using this method, please make sure that you have installed dotenv-defaults with npm or yarn in the same directory_)\n\n### Differences\n\nThe only thing to note is that the original module supported an `options` argument in the `config` function.\n\nThis module supports that as well, but there is an added `defaults` property that can allow you to define where that file is located. An example is shown below:\n\n```js\n// all of these are the default values...\nrequire(`dotenv-defaults`).config({\n  path: './.env',\n  encoding: 'utf8',\n  defaults: './.env.defaults' // This is new\n})\n```\n\n### License\n\nMIT\n","publish_time":1592836602269,"_cnpm_publish_time":1592836602269,"dist-tags":{"latest":"6.0.0"}}