{"name":"dotenv-defaults","version":"2.0.2","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":"^8.2.0"},"devDependencies":{"jest":"^25.0.0","standard":"^14.3.4"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"gitHead":"1c4090f2e22701188f57972ce32fc130779595c2","_id":"dotenv-defaults@2.0.2","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-iOIzovWfsUHU91L5i8bJce3NYK5JXeAwH50Jh6+ARUdLiiGlYWfGw6UkzsYqaXZH/hjE/eCd/PlfM/qqyK0AMg==","shasum":"6b3ec2e4319aafb70940abda72d3856770ee77ac","tarball":"http://registry-npm.ywwl.com/dotenv-defaults/download/dotenv-defaults-2.0.2.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\nwsFcBAEBCAAQBQJguGNTCRA9TVsSAnZWagAAJtcP/iz7ZOuKw8apHy4yONQ2\nf4c/3OjbdQOmBHwoZuP8i6AY09OgxeabPkJTBGFAzWePUIykXYjpZvrGT4z1\ndvz+TSODWngoAffBN7d1tG8TenmMlkyudUzVywpu0IJBYZfK8Nb87F9XbRko\nqmBVgETqby+/oLByMKVMVK0hgMK4ZBpEU5beLAsabQn/4V/Zx+YciXjHdDSR\nQbkGq/AtFmy6YsB6G8fmyo5PRs6lO6YK3JkuO/43dznId/LD+eVBBfxqsl6V\nKjbHIPleAOVfxhRVWAeRuPobdL33OCoAuWQAVVWZD5o0QwxnRvG4BSN8dWE4\n9RKeFUOSzc4sEzupgpj710KZXTKkv8irlS8WgYzf9QK3X0oL/E3o/bI2cEte\nB0GlYuNs4Zqz6Apj6+pfLhBBdpMGFvqK0H75BfmEpAud5evdiSvESs4hGWAl\nuOH0fCe6QIXJJP9Gn/TpgOOAnGCldBVRfpJFrEEHBfzvlq7f1oTrP3kqxDoJ\n1NOgu9lb1vyvX2s5tsQNpxLE+IweI0pa2Y88EqdlvXcRT2Km9Ey7a2+NSy3g\nd5g5duFaUNsdmpTbbdpVMh4/vdWJgus2VYM8n1ztRfCCeae+og8fU142zfO8\nTC85F6oubnYi+Sc/HnLZYDONhYuNG9yGVzC31k/hnQc1Mv4himBppMg2DNd/\n+3/Y\r\n=bLw8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGoUuC69nV7ayeHt7NJWkKMIaMFWS1LYCY4VEsfOMvV1AiAxPyFTkHvOTLM7jAz88Glg7E3bhV1GGbHRRGc8tOL/qw=="}],"size":3122,"noattachment":false,"key":"/dotenv-defaults/-/dotenv-defaults-2.0.2.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_2.0.2_1622696787434_0.5341418857802915"},"_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":1622696787597,"_cnpm_publish_time":1622696787597,"dist-tags":{"latest":"6.0.0"}}