{"name":"dotenv-defaults","version":"2.0.1","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":"^14.3.4"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"gitHead":"d14a885e21296b594ff2439f03227da4b43df8f1","_id":"dotenv-defaults@2.0.1","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-ugFCyBF7ILuwpmznduHPQZBMucHHJ8T4OBManTEVjemxCm2+nqifSuW2lD2SNKdiKSH1E324kZSdJ8M04b4I/A==","shasum":"ea6f9632b3b5cc55e48b736760def5561f1cb7c0","tarball":"http://registry-npm.ywwl.com/dotenv-defaults/download/dotenv-defaults-2.0.1.tgz","fileCount":6,"unpackedSize":7223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPsNzCRA9TVsSAnZWagAADfIP/iW33bYR4bOY+5Sjj7yL\nkwxhGth4Afw1konUwkFimITMKcC5TYJkuYUld3fN5Ax5ETiVLkE9cHZOROXs\nucbdKSX9q8xdq39dTHIKwde6yboMESuC5OsIzLmjuM0mKpCUEDNYVbHvZ1Uu\ni9cnWTc2jNoN4iJjfOe3JZfP8uhzl4V8HGeRgAnqKno5bqph2ZNMruRPxkj3\nfLvnJumw2IsQNIk8U1rem62vVgxANFSQ9/ahwpZN1j21JZuKzGk0bFpp5lgv\nRwqvHjv65IOrv/h465G0525HlWGr36zgtyKy6fyxLwIkdhdvs2IGFsXl+1Jt\n3I1qd/p6R5e1U/BzASTZ05I3oD0ML/bBew8qPDIazPsAf4bDAQmG6qJ3mxAr\nPIQHMFUeT8kzmXMsDQdOTCVAv2UFTPcFjByIe/Zbeik6QKSYvTNf2OVNlI7h\nrQXxvB/nxjRnlkDHGMb3CXlh7VnFWLOOUFR09byS4+bey/9hrOJMb45uNO/h\n9r3XmDGALm7MOZkphWVHoEmfy1l+AKUFnrIdbnx7ZXQOkhmmvetQ78kygnIo\nIJDckUmrY1QmQ/H6pIvbG4SbxD5FWlIJ4NEpJv48uNN7s9uSNCnfRcVUjmSZ\nBLkVDJZcs8Ncntcx93VXTBImRrGP7jVHyoP84wkPKIW4lEL+TXSiflpca2BV\nhQuB\r\n=orsP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5y+m/7Ok4Le/A/z3QOSQBEUCXOXn9o4UBDLaXcH7CMAiAni9pgU4EtEFlUTsX8gtqTh523VCsixNqgqc45P4WYtg=="}],"size":3107,"noattachment":false,"key":"/dotenv-defaults/-/dotenv-defaults-2.0.1.tgz"},"maintainers":[{"name":"mrsteele","email":"matt@omnionline.us"}],"_npmUser":{"name":"mrsteele","email":"matthewsteele1@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-defaults_2.0.1_1597948786512_0.058931944927154145"},"_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":1597948786631,"_cnpm_publish_time":1597948786631,"dist-tags":{"latest":"6.0.0"}}