{"_id":"dotenv-run-script","_rev":"5-75bcdd4633b596bcbf2ccedd58adaf53","name":"dotenv-run-script","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"dotenv-run-script","version":"0.1.0","description":"Run NPM scripts in specific environments","bin":{"dotenv-run-script":"bin/dotenv-run-script"},"main":"dist/index.js","scripts":{"build":"tsc","test:simple":"npm test --prefix examples/simple","test:advanced":"npm test --prefix examples/advanced","test":"npm run test:simple && npm run test:advanced"},"repository":{"type":"git","url":"git+https://github.com/kraenhansen/dotenv-run-script.git"},"keywords":["npm","run","scripts","dotenv","env",".env","environment","variables","config","settings"],"author":{"name":"Kræn Hansen","email":"mail@kraenhansen.dk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/kraenhansen/dotenv-run-script/issues"},"homepage":"https://github.com/kraenhansen/dotenv-run-script#readme","dependencies":{"dotenv":"^8.2.0","dotenv-expand":"^5.1.0"},"devDependencies":{"@types/node":"^14.14.19","typescript":"^4.1.3"},"gitHead":"f9876b9c589fbac6e1765ade99237b9b39b87028","_id":"dotenv-run-script@0.1.0","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-rFPtNYeVPyEkX+HmmUMQJGeSCLluNCX3enMRd3zQqfs6Ou2O8bCRlhIMVbD0SR9FGD2zk1f1hLzpEOLX5uT4OA==","shasum":"65b368ceb5f742dd784f67382b4438c7530143ac","tarball":"https://registry.npmjs.org/dotenv-run-script/-/dotenv-run-script-0.1.0.tgz","fileCount":5,"unpackedSize":18741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8MY9CRA9TVsSAnZWagAAmg0QAJt51ZLglmo/AKLlT6qs\nuTunDeW/i/imdmNCZDVEFdzvI1+kdGpBXRgQetdIayQXYyBKGZl4GNzy6r4V\nVhmJakjkCJkG2c9qNJb0OGKDgNU7APYkBqtaXxFs94EO2+HCMpuKUKCZm4LZ\nA5CywCBfIhHMYRe6oseUVOUamn1nELGRPcB94NiZBrk37YOMWEnhER8+IhSy\nN1Gl5dGQbHzM4foBo0zvYGpIAVTYthcgX4/OG/bXbLXRxIB3oEgffOJBQFNU\nxcqRoWLNjCouU0b1q2fc+IlluQqb0tepFcjW5Mv1iuGU4nxULXSB1BZyXhJM\n3FpDcdqM3QPDlUtBG9kuYRTS897Yc54OLHzSIMXwgpzlCJj8+SBm0aUxbbhC\nCziTswY0lHTyposURa0GBVv2HOQbWN2OgNZkUp+f8buqm5T0zneLzh1WgDV0\nixEfyeA55k/NoHkqoSE7ZKSrHSLYux16LT3qk8UbXVd+uY91QK8ZTV/4Esmu\nUyDehHiPsH2ztf/qmo8m54uZPByJVP+sWIfBbNxThtQePB92PKHJ7R9GinhS\nGPxK3ukWWgW9TejwIb32eGXU5qbXwkzR5zLKLXUHXryweYPK1+o1qP2FGHE7\nVJ7IXaVCpaDnq6uyKAYuHFlEOUuzC8e2INEbS+cA5czVx6d3rEFav6sa/iL/\nxsiX\r\n=p7hi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGhBf86+l+yucJtCJKpb7PZH2ebI871mWeK7uAPJle44AiEAwi6ChIULdmXrUk7nFgeGpaozKQg+sc2e3M6Tl5jNbqQ="}]},"_npmUser":{"name":"kraenhansen","email":"mail@kraenhansen.dk"},"directories":{},"maintainers":[{"name":"kraenhansen","email":"mail@kraenhansen.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-run-script_0.1.0_1609614908595_0.917650363997097"},"_hasShrinkwrap":false},"0.2.0":{"name":"dotenv-run-script","version":"0.2.0","description":"Run NPM scripts in specific environments","bin":{"dotenv-run-script":"bin/dotenv-run-script"},"main":"dist/index.js","scripts":{"build":"tsc","test:simple":"npm test --prefix examples/simple","test:advanced":"npm test --prefix examples/advanced","test":"npm run test:simple && npm run test:advanced"},"repository":{"type":"git","url":"git+https://github.com/kraenhansen/dotenv-run-script.git"},"keywords":["npm","run","scripts","dotenv","env",".env","environment","variables","config","settings"],"author":{"name":"Kræn Hansen","email":"mail@kraenhansen.dk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/kraenhansen/dotenv-run-script/issues"},"homepage":"https://github.com/kraenhansen/dotenv-run-script#readme","dependencies":{"dotenv":"^8.2.0","dotenv-expand":"^5.1.0"},"devDependencies":{"@types/node":"^14.14.19","typescript":"^4.1.3"},"gitHead":"f113de9cb85c2e25cfc6dc0de261bed76db47f6c","_id":"dotenv-run-script@0.2.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-7uLtpTeGZAcIa0qF+zd8ZAS9CZrRf3RyggsHXveO/LBY48y2nwVVbmqnC2nU4/s5abSWEg7IvpcjXjMrUmnQJA==","shasum":"e98ec18871986550c39cdbfeb279f395e92047ae","tarball":"https://registry.npmjs.org/dotenv-run-script/-/dotenv-run-script-0.2.0.tgz","fileCount":5,"unpackedSize":18940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpMHTCRA9TVsSAnZWagAA3z8P/RkJLgVVINgjJraxD7EE\netu5fuWhdOnuSFblww0tUgt78fHLRIZb841+9fQv5k98s9DG4dpNUy0ZrGrf\nSKG3djHHPJ682ZiAo/UHpKN7W2s8IUUBOfh215SpIeOUagb9/IamFUSEvKTQ\n6yd4lR80KeGrWfLC8QKpREy/U3zStm59EYJdf9TZJh6SXKRe8ynLn2SYYb07\nfgYOja0ednuOMaytNKjfpmarZ0WT4TdgZLxPWJwe/dII3DP0R4WAsVKWd9vg\nJ89JAI+eH/6xflsJCcA6DW89RHLRpw2MmaVuRhpF2EvFJNhEncUQM2TXdlc3\nbQWBRx2D2EcxRx+TiOTOvM3RGmczzHUyGmtHsdPIxLiXrHoUu75Ri4DhfxIT\nWtbkTXr0VmLxmQWnwisGLr0zDCFPduobzWkajMaDrkJvwTFV+CSah/ImtQ4E\nw/yU5xsRfIu08pRNMnPCY+LI/iMNPPzbxvl3l77pZoZWPusdIE7+dtzK2Yst\nVIWqaAK470iUnR6JGFSzxAN4MowHhaoXpYmXNCvFLyyuJaI8sF0ysk2qP8kZ\nBLm8LHbN6If0EzatTgaasCtZxchwqqvnQUbzbVQYBGecjiUqsdZiVdYy24XM\np8Hgn6kFUFtrIu/XPqmlvKA+7oLKu6HVWtABhDMPct+6Mzdva+Tv4jRofGGp\nnuo7\r\n=FJMr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGe3LLq5mUGIKyjT7IOyra/2hCD2l3RHcPaRccrwjmobAiEA58gm8IkMwDF51EFRum8ui9pa6+Wt18mwlRbvBVHhMGM="}]},"_npmUser":{"name":"kraenhansen","email":"mail@kraenhansen.dk"},"directories":{},"maintainers":[{"name":"kraenhansen","email":"mail@kraenhansen.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-run-script_0.2.0_1638187474825_0.02394829688477529"},"_hasShrinkwrap":false},"0.3.0":{"name":"dotenv-run-script","version":"0.3.0","description":"Run NPM scripts in specific environments","bin":{"dotenv-run-script":"bin/dotenv-run-script"},"main":"dist/index.js","scripts":{"build":"tsc","test:simple":"npm test --prefix examples/simple","test:advanced":"npm test --prefix examples/advanced","test":"npm run test:simple && npm run test:advanced"},"repository":{"type":"git","url":"git+https://github.com/kraenhansen/dotenv-run-script.git"},"keywords":["npm","run","scripts","dotenv","env",".env","environment","variables","config","settings"],"author":{"name":"Kræn Hansen","email":"mail@kraenhansen.dk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/kraenhansen/dotenv-run-script/issues"},"homepage":"https://github.com/kraenhansen/dotenv-run-script#readme","dependencies":{"dotenv":"^16.2.0","dotenv-expand":"^10.0.0"},"devDependencies":{"@types/node":"^20.3.1","typescript":"^5.1.3"},"workspaces":["examples/*"],"gitHead":"7c4969df90096920b574b9ec86bba37a63e6b15f","_id":"dotenv-run-script@0.3.0","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-YimLVd0Exg2nF79aeFcK6MW1Ov7+9oiQT0/NnjMRNOOBlH4+suDFF3aKCtl7LbC8VItillXi/BacKIh24Nh8oA==","shasum":"548b9b9fd5fbfa7d72b8ca9dce51a2c216c22a64","tarball":"https://registry.npmjs.org/dotenv-run-script/-/dotenv-run-script-0.3.0.tgz","fileCount":5,"unpackedSize":19173,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIHdsV3mBw2Su6lpH7TkktJiCQKeAJ8rhPqxodLxpPsWCAh8VVC1/t8m4/CjyJ7B1+oBpEswc9Pd/viVsZxoLSkMD"}]},"_npmUser":{"name":"kraenhansen","email":"mail@kraenhansen.dk"},"directories":{},"maintainers":[{"name":"kraenhansen","email":"mail@kraenhansen.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-run-script_0.3.0_1686926311209_0.3066219535797994"},"_hasShrinkwrap":false},"0.4.0":{"name":"dotenv-run-script","version":"0.4.0","description":"Run NPM scripts in specific environments","bin":{"dotenv-run-script":"bin/dotenv-run-script"},"main":"dist/index.js","scripts":{"build":"tsc","test:simple":"npm test --prefix examples/simple","test:advanced":"npm test --prefix examples/advanced","test":"npm run test:simple && npm run test:advanced"},"repository":{"type":"git","url":"git+https://github.com/kraenhansen/dotenv-run-script.git"},"keywords":["npm","run","scripts","dotenv","env",".env","environment","variables","config","settings"],"author":{"name":"Kræn Hansen","email":"mail@kraenhansen.dk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/kraenhansen/dotenv-run-script/issues"},"homepage":"https://github.com/kraenhansen/dotenv-run-script#readme","dependencies":{"dotenv":"^16.3.1","dotenv-expand":"^10.0.0"},"devDependencies":{"@types/node":"^20.6.0","typescript":"^5.2.2"},"workspaces":["examples/*"],"gitHead":"3cdff4815e68a644fd71596e03e4a1bffe684988","_id":"dotenv-run-script@0.4.0","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-NBkbfHIqb4ZUCG8CoQlNhwgVU4mRqNVLjzFcJ+6VDe9mlFMHdoiBqQ4SDn0rGSTBhQArJjl8S8MLkNmFniEeQg==","shasum":"c5b4988711302ffc8365c3256a5bc9400e5afc23","tarball":"https://registry.npmjs.org/dotenv-run-script/-/dotenv-run-script-0.4.0.tgz","fileCount":5,"unpackedSize":19489,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYNd2jookpDvIq+FCO1MrqkepgxsOXCrOnpKziOLFv+gIhAJ9o7zMMQZWSc4dAyWigEtdtx/xYKreqElDK88rI4c7O"}]},"_npmUser":{"name":"kraenhansen","email":"mail@kraenhansen.dk"},"directories":{},"maintainers":[{"name":"kraenhansen","email":"mail@kraenhansen.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-run-script_0.4.0_1694439564385_0.279824011746324"},"_hasShrinkwrap":false},"0.4.1":{"name":"dotenv-run-script","version":"0.4.1","description":"Run NPM scripts in specific environments","bin":{"dotenv-run-script":"bin/dotenv-run-script"},"main":"dist/index.js","scripts":{"build":"tsc","test:simple":"npm test --prefix examples/simple","test:advanced":"npm test --prefix examples/advanced","test":"npm run test:simple && npm run test:advanced"},"repository":{"type":"git","url":"git+https://github.com/kraenhansen/dotenv-run-script.git"},"keywords":["npm","run","scripts","dotenv","env",".env","environment","variables","config","settings"],"author":{"name":"Kræn Hansen","email":"mail@kraenhansen.dk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/kraenhansen/dotenv-run-script/issues"},"homepage":"https://github.com/kraenhansen/dotenv-run-script#readme","dependencies":{"dotenv":"^16.3.1","dotenv-expand":"^10.0.0"},"devDependencies":{"@types/node":"^20.6.0","typescript":"^5.2.2"},"workspaces":[".","examples/*"],"gitHead":"e217d7d4c3d7a84a600d8cb97b33980a7dc83e56","_id":"dotenv-run-script@0.4.1","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-5mHhOVcSMY7X9lC50xjJL2oKiW75gqvpZpUmJRrFMOAdbNZ+hk8z1wIG9Rh/noEzbgRqYd34EmOpbStc1d+GOg==","shasum":"918161e4344cd39e27996d71a155d1f3a06470d6","tarball":"https://registry.npmjs.org/dotenv-run-script/-/dotenv-run-script-0.4.1.tgz","fileCount":5,"unpackedSize":19516,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTQOZalBBXG4snXYHj88oXyG0PVAOrrxajG/EQXd+hDQIhAJIAoDDRosq3KeFT5EYWLtCBb/3mvbKdtoGp8RTx/Dja"}]},"_npmUser":{"name":"kraenhansen","email":"mail@kraenhansen.dk"},"directories":{},"maintainers":[{"name":"kraenhansen","email":"mail@kraenhansen.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-run-script_0.4.1_1694611987297_0.48416237310260835"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-02T19:15:08.595Z","0.1.0":"2021-01-02T19:15:08.709Z","modified":"2023-09-13T13:33:07.703Z","0.2.0":"2021-11-29T12:04:35.176Z","0.3.0":"2023-06-16T14:38:31.386Z","0.4.0":"2023-09-11T13:39:24.576Z","0.4.1":"2023-09-13T13:33:07.525Z"},"maintainers":[{"name":"kraenhansen","email":"mail@kraenhansen.dk"}],"description":"Run NPM scripts in specific environments","homepage":"https://github.com/kraenhansen/dotenv-run-script#readme","keywords":["npm","run","scripts","dotenv","env",".env","environment","variables","config","settings"],"repository":{"type":"git","url":"git+https://github.com/kraenhansen/dotenv-run-script.git"},"author":{"name":"Kræn Hansen","email":"mail@kraenhansen.dk"},"bugs":{"url":"https://github.com/kraenhansen/dotenv-run-script/issues"},"license":"Apache-2.0","readme":"# dotenv-run-script\n\nRun NPM scripts with changing environments.\n\n## Usage\n\nInstall the package\n\n```bash\nnpm install dotenv-run-script --save-dev\n```\n\nAdd one or more scripts to your `package.json` which uses one or more environment variables (`GREETINGS` in the example below)\n\n```js\n{\n  // ... other package stuff above\n  \"scripts\": {\n    \"test\": \"echo $GREETING world!\"\n  }\n}\n```\n\nCreate an `.env` file with the variables used by the script\n\n```\nGREETING=Hello\n```\n\n```bash\nnpx dotenv-run-script test\n```\n\nRun the `test` NPM script.\n\n## Using multiple `.env` files\n\nThe `dotenv-run-script` CLI takes any number of optional positional arguments, one for each `.env` file to be loaded (in sequence). \n\nThe arguments are checked in sequence, all arguments will get [parsed](https://www.npmjs.com/package/dotenv#parse) and [expanded](https://www.npmjs.com/package/dotenv-expand) until either the argument `--` or the argument does not resolve to a file.\n\nThe following loads a `.env` followed by a `.env.production` file and proceeds to execute the `test` script.\n\n```bash\nnpx dotenv-run-script .env .env.production -- test\n```\n\n## Adding a script per environment\n\nIt's recommended to add a script to the project's package.json to signal the use of `dotenv-run-script` and ease the discovery of supported environments:\n\n```js\n{\n  // ... other package stuff above\n  \"scripts\": {\n    \"greet\": \"echo $GREETING $PLACE\",\n    \"production\": \"dotenv-run-script .env .env.production --\",\n    \"development\": \"dotenv-run-script .env .env.development --\",\n  }\n}\n```\n\n```\n// .env\nGREETING=Hello\nPLACE=World!\n```\n\n```\n// .env.production\nPLACE=Universe!\n```\n\n```\n// .env.development\nPLACE=Localhost\n```\n\nIn the example above, two environments are used `.env.production` and `.env.development` in addition to a shared `.env` which includes common variables. Notice how the `PLACE` variable gets overridden.\n\nThe `greet` script can be invoked with\n\n```bash\nnpm run production greet\n```\n\n## Examples\n\nSee the [simple](examples/simple) and [advanced](examples/advanced) examples for usage.\n\n## Alternatives you might consider using\n\n- [dotenv's preload script](https://www.npmjs.com/package/dotenv#preload)\n- [dotenv-run](https://www.npmjs.com/package/dotenv-run) which provide similar, but limited functionality to this package. At the time of writing this, it does not\n  - use dotenv-expand to assign variables from other variables.\n  - allow multiple .env files to be loaded in sequence\n  - call `npm run` but any executable\n","readmeFilename":"README.md"}