{"name":"dotenv-defaults","version":"4.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":"bc672071cc3673788281a0f47310cf010158a8c4","_id":"dotenv-defaults@4.0.0","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-jbvTqk5JI0cCi4fFQp5Wkjj7+zhMpEwxFNOO7NTT5iXfcMxjh8jCVbh3wrd4ZGnTq1iqsP1hBGgUqRYoKKswcA==","shasum":"5e8f69cf436d8316f03f75981586af8b7e424d17","tarball":"http://registry-npm.ywwl.com/dotenv-defaults/download/dotenv-defaults-4.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\nwsFcBAEBCAAQBQJh5YFcCRA9TVsSAnZWagAAs58QAIx4OVzGGOc6FYx6joqZ\naMoJVMf9D/M6Hi8NQgXUFBN9np4V7XiqHasXmFPxFeBw5GlwRhH8Uiwyyd71\nvV0iHLCSoWXP9+BCEUADJqv9x3aGVF5M2oEHrinR2AGc5j+qehzYuwPhLXTB\nBDS1qwvrNvjDeFnexykjodEjfFtfZJoJl9KJSIJVUCjwjTf35Ka5C2IOtarR\neOFkAIlEV8JKmKdJLUEcsLfKwizPEYQ7NeKwBZs+celrUqVpc1LX8VEpNk04\nYfjPLt+0BPZIiq9+6SQkjUkkBUptQWaJDNVW0ryosPzYrMznz6VewWOREzHn\nxcncjZ3PFj3cHUycKHs5MceFGH63nUYyF7IQcvTqzavh54TSWbIw1KEXJj67\nJTxFZcGFbrbo/cDLeaS3UesxwJMA2yQ+UqKq9DVLOtwoycoqPGTcWsA/EY2E\nO1k4S1FHj/07+gb/QzMIRiQ07lq7YdAcodI8zIaTcqOyrbEvQwDOhes4eehH\nn41TkZmnW0jQYuNyrRs3sEyafmhdA+fDkIpcGdKW6chJqOseyFwwzonrT6DX\nMtWRx/fiwXfyD1X0Z3dshndAAssepEJ/0F+HwPBuED+agbMMeU3JQohp15nc\nunZZONwa4q/aWEp7QnpaLxtl8tKyXRTmteduKfH+5307tPJPYgspwhjYOetp\nHzBL\r\n=yE6c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwJmgm9Fe4lAVtTHie5bn2h6EmD9McDFwVWf9D/1TSLwIhAMxT+6hcc4NZdUgEM4tKRY6l5ZWc/lElRJD9OzPcxKFy"}],"size":3125,"noattachment":false,"key":"/dotenv-defaults/-/dotenv-defaults-4.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_4.0.0_1642430811961_0.5168273406479345"},"_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":1642430812117,"_cnpm_publish_time":1642430812117,"dist-tags":{"latest":"6.0.0"}}