{"_id":"if-env","_rev":"16-cf5e0da1da311e09588689171fd1da18","name":"if-env","description":"Simplify npm scripts with \"if-env ... && npm run this || npm run that\"","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"if-env","version":"1.0.0","description":"Simplify npm scripts with \"if-env ... && npm run this || npm run that\"","bin":{"if-env":"bin/if-env.js"},"scripts":{"changelog":"npm-run-all changelog:generate changelog:add","changelog:add":"git add CHANGELOG.md","changelog:generate":"github_changelog_generator --future-release $npm_package_version","postversion":"npm-run-all version:amend publish","publish":"npm-run-all publish:git publish:npm","publish:git":"git push && git push --tags","publish:npm":"npm publish","test":"NODE_ENV=test mocha","version":"npm run changelog","version:ammend":"git commit --amend -m \"Release v${npm_package_version}\" && npm run release"},"repository":{"type":"git","url":"git+https://github.com/ericclemmons/if-env.git"},"keywords":["npm","script","env","if","run"],"author":{"name":"Eric Clemmons","email":"eric@smarterspam.com"},"license":"MIT","bugs":{"url":"https://github.com/ericclemmons/if-env/issues"},"homepage":"https://github.com/ericclemmons/if-env#readme","devDependencies":{"expect":"1.13.4","mocha":"2.3.4"},"dependencies":{"npm-run-all":"1.4.0"},"gitHead":"98fdbf4e651f7cdc88cec9f05d50a47f9768ed03","_id":"if-env@1.0.0","_shasum":"6e09082cdd3f2ccfb75baf022a4a971565f6007c","_from":".","_npmVersion":"2.14.1","_nodeVersion":"4.1.1","_npmUser":{"name":"ericclemmons","email":"eric@smarterspam.com"},"maintainers":[{"name":"ericclemmons","email":"eric@smarterspam.com"}],"dist":{"shasum":"6e09082cdd3f2ccfb75baf022a4a971565f6007c","tarball":"https://registry.npmjs.org/if-env/-/if-env-1.0.0.tgz","integrity":"sha512-4FDWj1f3nc1bROgJa2bUrE4RuWnEprvGuJKQELPafXb9FoBrSyGNk6221gUyGG81SqgtUBL+opyyjzc805LlUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF7opEENHh+u4mgtOSmS47Mt10DDm7vSZV16ixH7QiOdAiEAzT4nU6H20cImDqmsRllUNG59hvDpT42iOq/7g88cvzU="}]}},"1.0.1":{"name":"if-env","version":"1.0.1","description":"Simplify npm scripts with \"if-env ... && npm run this || npm run that\"","bin":{"if-env":"bin/if-env.js"},"scripts":{"changelog":"npm-run-all changelog:generate changelog:add","changelog:add":"git add CHANGELOG.md","changelog:generate":"github_changelog_generator --future-release $npm_package_version","postversion":"npm-run-all version:amend publish","publish":"npm-run-all publish:git publish:npm","publish:git":"git push origin master --tags","publish:npm":"npm publish","test":"NODE_ENV=test mocha","version":"npm run changelog","version:amend":"git commit --amend -m \"Release v${npm_package_version}\" && npm run release"},"repository":{"type":"git","url":"git+https://github.com/ericclemmons/if-env.git"},"keywords":["npm","script","env","if","run"],"author":{"name":"Eric Clemmons","email":"eric@smarterspam.com"},"license":"MIT","bugs":{"url":"https://github.com/ericclemmons/if-env/issues"},"homepage":"https://github.com/ericclemmons/if-env#readme","devDependencies":{"expect":"1.13.4","mocha":"2.3.4"},"dependencies":{"npm-run-all":"1.4.0"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015 Eric Clemmons\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"if-env@1.0.1","dist":{"shasum":"91aba611c5dbc6431d5aadfcf388286648ccedeb","tarball":"https://registry.npmjs.org/if-env/-/if-env-1.0.1.tgz","integrity":"sha512-3WIQKOkea96zbzLQZTEiN8sz/xUAOZvRRlEGoKnJ4fVjnhdP13fUGCJPSoOp9rH9/MHYEi5cQ91noE1bPT0XDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3gy1rcyvAyBDb017cAiebyDz3O5ULtuLkQ8boFiTgWgIgSq+jbz03vnp25/EJLB2PdF863/ft8y4yWS4VbnOhyJk="}]},"maintainers":[{"name":"ericclemmons","email":"eric@smarterspam.com"}],"_npmUser":{"name":"ericclemmons","email":"eric@smarterspam.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/if-env-1.0.1.tgz_1517098006690_0.31824096641503274"}},"1.0.2":{"name":"if-env","version":"1.0.2","description":"Simplify npm scripts with \"if-env ... && npm run this || npm run that\"","bin":{"if-env":"bin/if-env.js"},"scripts":{"changelog":"npm-run-all changelog:generate changelog:add","changelog:add":"git add CHANGELOG.md","changelog:generate":"github_changelog_generator --future-release $npm_package_version","postversion":"npm-run-all version:amend publish","publish":"npm-run-all publish:git publish:npm","publish:git":"git push origin master --tags","publish:npm":"npm publish","test":"NODE_ENV=test mocha","version":"npm run changelog","version:amend":"git commit --amend -m \"Release v${npm_package_version}\" && npm run release"},"repository":{"type":"git","url":"git+https://github.com/ericclemmons/if-env.git"},"keywords":["npm","script","env","if","run"],"author":{"name":"Eric Clemmons","email":"eric@smarterspam.com"},"license":"MIT","bugs":{"url":"https://github.com/ericclemmons/if-env/issues"},"homepage":"https://github.com/ericclemmons/if-env#readme","devDependencies":{"expect":"1.13.4","mocha":"2.3.4"},"dependencies":{"npm-run-all":"1.4.0"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015 Eric Clemmons\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"if-env@1.0.2","dist":{"shasum":"a2699eb379841ff4e4614841c270efd9b33800c4","tarball":"https://registry.npmjs.org/if-env/-/if-env-1.0.2.tgz","integrity":"sha512-x3W46bOHXlLWwWP7ttMzL9fpAJ5JgdOqzNmbczKMfdIW2mqRS14KVVKeVqPaVarsIODGEXvYEf91uY+GmhT5Nw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbDEZGDVI7nuWkxBkgahDzI7q58IoMc3fFD3wKFmQ26AiANd/pt6cx/cNJysWlGKHpMu0Nyvi3hSgM6d95frCziOA=="}]},"maintainers":[{"name":"ericclemmons","email":"eric@smarterspam.com"}],"_npmUser":{"name":"ericclemmons","email":"eric@smarterspam.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/if-env-1.0.2.tgz_1517098036258_0.9869983887765557"}},"1.0.3":{"name":"if-env","version":"1.0.3","description":"Simplify npm scripts with \"if-env ... && npm run this || npm run that\"","bin":{"if-env":"bin/if-env.js"},"scripts":{"changelog":"npm-run-all changelog:generate changelog:add","changelog:add":"git add CHANGELOG.md","changelog:generate":"github_changelog_generator --future-release $npm_package_version","postversion":"npm-run-all version:amend publish","publish":"npm-run-all publish:git publish:npm","publish:git":"git push origin master --tags","publish:npm":"npm publish","test":"NODE_ENV=test mocha","version":"npm run changelog","version:amend":"git commit --amend -m \"Release v${npm_package_version}\" && npm run release"},"repository":{"type":"git","url":"git+https://github.com/ericclemmons/if-env.git"},"keywords":["npm","script","env","if","run"],"author":{"name":"Eric Clemmons","email":"eric@smarterspam.com"},"license":"MIT","bugs":{"url":"https://github.com/ericclemmons/if-env/issues"},"homepage":"https://github.com/ericclemmons/if-env#readme","devDependencies":{"expect":"1.13.4","mocha":"2.3.4"},"dependencies":{"npm-run-all":"1.4.0"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015 Eric Clemmons\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"if-env@1.0.3","dist":{"shasum":"5b60186300ee471218b3ae4cdb4e579498a7e731","tarball":"https://registry.npmjs.org/if-env/-/if-env-1.0.3.tgz","integrity":"sha512-mS3vBBMZV8X7b43VCbEPoYh3A92Q/NolZDQq/KKhnxYX7MdHGjzeTUAnjUoy6RdxlaK91BKxEHdRAVlKFoFSjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa1a81kG+0XfHw3JJtNUkcac8oC9Djfia21nkfEBBeVQIgIQasWU6gN4ZIXPDUnTpP6gBjjx3lX0I1JceWZsAOcQ0="}]},"maintainers":[{"name":"ericclemmons","email":"eric@smarterspam.com"}],"_npmUser":{"name":"ericclemmons","email":"eric@smarterspam.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/if-env-1.0.3.tgz_1517098088943_0.5237091991584748"}},"1.0.4":{"name":"if-env","version":"1.0.4","description":"Simplify npm scripts with \"if-env ... && npm run this || npm run that\"","bin":{"if-env":"bin/if-env.js"},"scripts":{"changelog":"npm-run-all changelog:generate changelog:add","changelog:add":"git add CHANGELOG.md","changelog:generate":"github_changelog_generator --future-release $npm_package_version","postversion":"npm-run-all version:amend publish","publish":"npm-run-all publish:git publish:npm","publish:git":"git push origin master --tags","publish:npm":"npm publish","test":"NODE_ENV=test mocha","version":"npm run changelog","version:amend":"git commit --amend -m \"Release v${npm_package_version}\" && npm run release"},"repository":{"type":"git","url":"git+https://github.com/ericclemmons/if-env.git"},"keywords":["npm","script","env","if","run"],"author":{"name":"Eric Clemmons","email":"eric@smarterspam.com"},"license":"MIT","bugs":{"url":"https://github.com/ericclemmons/if-env/issues"},"homepage":"https://github.com/ericclemmons/if-env#readme","devDependencies":{"expect":"1.13.4","mocha":"2.3.4"},"dependencies":{"npm-run-all":"1.4.0"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015 Eric Clemmons\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"if-env@1.0.4","dist":{"shasum":"8b2b6bd308af86a3a19bb273426761085104878b","tarball":"https://registry.npmjs.org/if-env/-/if-env-1.0.4.tgz","integrity":"sha512-4tDLfStvvI8Yh0+tBseP2KufM33QQdLxbm4OlUgVCH6sr3t+kRcPMMzt/zOwB0nzAyW/ZqrXtMdkaUsPIZMLYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJWAgxYu0q2ySE+eehyRTH/dkLwZ0dFVw429fXwIayhQIgBQiXXvaOqlF5Z/Bh2uyZEty7KwpqcwZQMpVCdxElYps="}]},"maintainers":[{"name":"ericclemmons","email":"eric@smarterspam.com"}],"_npmUser":{"name":"ericclemmons","email":"eric@smarterspam.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/if-env-1.0.4.tgz_1517098131750_0.4586630540434271"}}},"readme":"# if-env\n\n> Simplify npm scripts with `if-env ... && npm run this || npm run that`\n\n- - -\n\n**I recommend switching to [`per-env`](https://github.com/ericclemmons/per-env), which is much simpler and much more powerful!**\n\n- - -\n\nSuppose you want to simplify development and be able to run `npm start`\nin all environments & run the correct scripts.\n\nYour `package.json` might look like this:\n\n```json\n\"scripts\": {\n  \"start\": \"if [[ ${NODE_ENV} == \\\"production\\\" ]]; then npm run start:prod; else npm run start:dev; fi\",\n  \"start:dev\": \"webpack\",\n  \"start:prod\": \"start-cluster\"\n}\n```\n\nThe problem is, this doesn't work in all environments.\n\nInstead, you can write:\n\n```json\n\"scripts\": {\n  \"start\": \"if-env NODE_ENV=production && npm run start:prod || npm run start:dev\",\n  \"start:dev\": \"webpack\",\n  \"start:prod\": \"start-cluster\"\n}\n```\n\n\n## Usage\n\n### 1. Install\n\n```shell\n$ npm install if-env --save\n```\n\n### 2. Add to `package.json`\n\n```json\n\"scripts\": {\n  \"start\": \"if-env SOME_ENV_VAR=some_val ANOTHER_ENV_VAR=another_val && npm run this || npm run that\"\n}\n```\n\n\n## License\n\n> MIT &copy; Eric Clemmons 2015\n","maintainers":[{"name":"ericclemmons","email":"eric@smarterspam.com"}],"time":{"modified":"2022-06-19T00:15:09.468Z","created":"2015-12-23T05:23:59.127Z","1.0.0":"2015-12-23T05:23:59.127Z","1.0.1":"2018-01-28T00:06:47.665Z","1.0.2":"2018-01-28T00:07:17.186Z","1.0.3":"2018-01-28T00:08:09.851Z","1.0.4":"2018-01-28T00:08:52.600Z"},"homepage":"https://github.com/ericclemmons/if-env#readme","keywords":["npm","script","env","if","run"],"repository":{"type":"git","url":"git+https://github.com/ericclemmons/if-env.git"},"author":{"name":"Eric Clemmons","email":"eric@smarterspam.com"},"bugs":{"url":"https://github.com/ericclemmons/if-env/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mysticatea":true,"igsys":true,"protovore":true,"princetoad":true,"serge-nikitin":true,"dalcib":true,"jtrh":true,"tommyldunn":true,"nickgogan":true}}