env-cmd
env-cmd copied to clipboard
Allow setting default env files locations
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"]
}
This is not a bad idea...although my question would be, why not just set the location on the CLI using -f? Just trying to understand the use case here.