-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable env path from ngxEnv options #42
Conversation
Hey, very good idea. I've created an issue to discuss the idea. Let me know what you think please. #43 |
could you add the option to the ngx-env.json file?
|
@@ -13,9 +13,9 @@ function escapeStringRegexp(str: string) { | |||
return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); | |||
} | |||
|
|||
function getClientEnvironment(prefix: RegExp) { | |||
function getClientEnvironment(prefix: RegExp, envPath: string = ".env") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by adding a default value to ngxEnv builder options (previous comment), the default value here is not needed
remove envPath default value from getClientEnvironment()
Sure thing! I've updated the PR |
Thank you @otonielguajardo! |
dotenv supports specifying the path of the .env file, this PR tries to acomplish the same.
It would be awesome for proyects with structures like this:
closes #43