{"name":"dotenv-defaults","version":"5.0.0","description":"dotenv... but with defaults!","main":"src/index.js","scripts":{"test":"jest","lint":"standard"},"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":"^14.0.0"},"devDependencies":{"jest":"^27.2.0","standard":"^16.0.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"gitHead":"aaa08fe7a18697c0f856b3ca4a412f520b3d32b9","_id":"dotenv-defaults@5.0.0","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-YnSVn9UP3j1njjalwrjOSlFkcT9b06BYSy5RqK1gI7bD+iezY7a1GOgJ+M4Vcs4A5RcE/ZcK1bYUAzIjUNqAzA==","shasum":"af69c0c5966f736d9619c162c086154dabe5fa62","tarball":"http://registry-npm.ywwl.com/dotenv-defaults/download/dotenv-defaults-5.0.0.tgz","fileCount":6,"unpackedSize":7348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5aZTCRA9TVsSAnZWagAAYTsP/3IckCAaT80xIDh/swu3\n2uBI4W7cnSqfhKgdoldMCGS79hlihSZ04DASEW+KxsSZHbWm0h4NzypBZfnv\n4XphOV3hfN6X39o7IWzVjG8KSiOqtsZeTQIc5xZAncAXd9D3Cc7a/dlXvbq9\n92DKDa1BEduRXq495Re1Fy17QjKooazSJB2eW/3Bda8EYP3H3shvDaS8TJHX\nOW1fWKGMDD9PdVI5FHx5oXPNjwqOYKSE8m/IsmwXtUzTVNxbyzlTQIO4Bx9y\naCMLKbsO0fyhqM/99EpJUT64EDPpH+HrlnI23AhJe/HtXw6m/IMqSbcVtYAN\nwHh+7JeEEpSE+0sn2fuHxu0779mOhVAdgH/OFnLe2blB9M2acFyz9zYqsa5s\nRXj1nIsosmxnWANiwkeisKZqBQenK3544370UJCyMm8/41iq/gmO0BBM/L4w\nOJ34nCkK6rfKVoIfsyAJnQ4nLO17yr+u27E0ktnAb+AAbabrGdjBt2K7YXub\nyqy5d68CF0xG9Q7uliubBIB4xg/88bN8gUSp+rqlk9mzGCRPbs0Lvd7rPIA/\n/Q6pXPMUKV8PdPbCErMEU8SvEUpednXVz7T4XT95tF9olyepAulWMWpmHhwq\nXLqo+sVVuaKrpdOrCKjD+cpvGGKsgy0LEA+Ye77WOCDBG4TGGnMnKNNL3ipS\njBDT\r\n=/vOn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAJxUw5DZjIVoZruBGLgWhP68auJy2rza8EKtMgK+7cAiEAi07HmPkijijh9PiQQh6hTsvy1i/nSKXuya9t1TDnTjU="}],"size":3126,"noattachment":false,"key":"/dotenv-defaults/-/dotenv-defaults-5.0.0.tgz"},"_npmUser":{"name":"mrsteele","email":"matthewsteele1@hotmail.com"},"directories":{},"maintainers":[{"name":"mrsteele","email":"matthewsteele1@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-defaults_5.0.0_1642440275120_0.6326612934717968"},"_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":1642440275288,"_cnpm_publish_time":1642440275288,"dist-tags":{"latest":"6.0.0"}}