toddbluhm / env-cmd

Setting environment variables from a file
https://www.npmjs.com/package/env-cmd
MIT License
1.73k stars 65 forks source link

Allow setting default env files locations #367

Open squivix opened 1 year ago

squivix commented 1 year ago

I want to be able to permentantly set the default location to search for env files if it's not specified in the command. Right now it's a constant:

https://github.com/toddbluhm/env-cmd/blob/8f35b71651f6a78710308ff38ab30896ea72ee8b/src/get-env-vars.ts#L6

But I want to set it in some sort of config, possibly through the package.json file:

  "env-cmd": {
    "ENV_FILE_DEFAULT_LOCATIONS": ["./env/*.env"]
  }