Closed rbabayoff closed 9 years ago
it's just a convention, you can have lowercase environment variables.
What we have to target is the center of a venn diagram compromised of JSON, cli arguments, and envvars.
Maybe you could have envvars that mapped FOO_BAR
to fooBar
but I feel that is a little too prescriptive... So it's much simpler to use lowercase/camelCase enviroment variables.
What about the dashes that env vars don't support?
@rbabayoff dashes are nice in cli args, but awkward in javascript. I think the best is to not use them, or if you really want to use hyphens in cli args, then map them to camel case with something like https://www.npmjs.org/package/to-camel-case
OK, tks
Hey,
The standard convention for environment variables is all upper case. In addition, environment variables don't support dashes. What I recommend is to take command line options and look for all upper case environment variables, replacing dashes with underscores, i.e.:
--phantmosjs-options -> MYAPP_PHANTOMJS_OPTIONS
Would you take a pull request for this?