benoror / better-npm-run

🏃‍♂️ Better NPM scripts runner
MIT License
639 stars 56 forks source link

Make .env overriding default script.env #54

Closed just-boris closed 8 years ago

just-boris commented 8 years ago

As I see in current source code, environment from package.json has priority over .env file. I think, it is not correct.

My use case: I have an environment variable PORT that has a default value in package.json. Then I would like to put .env file with override it. .env will be put under .gitignore, so any developer can put his local preferences, however, committed defaults will be available in package.json

If it is not possible, there should be another way to override properties from package.json locally.

benoror commented 8 years ago

Hi @just-boris,

Same topic was discussed & addressed here: https://github.com/benoror/better-npm-run/issues/41

In summary: one order should be supported in spite of the other, and this package follows the same convention as dotenv

I will close the issue, nevertheless I'm open for discussion, and as always you can submit a PR with proper test(s) and proposed changes 😄

If you still have comments feel free to comment.

Cheers!