-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Add shellscript filenamePatterns
for .env.*
#173426
Conversation
In some cases, projects use `.env` files such as `.env.development` or `.env.production` or similar things. Adding this to extensions/shellscript/package.json as a `filenamePatterns` avoids developers having to add specific `"files.associations"` to their VS Code settings files. Fixes #173425
@thernstig can you share several examples of these |
@alexr00 An example would be two different deployments like this, where clients have different databases because an application supports multiple: .env.production_site_1export MONGODB_ENABLED=true
export POSTGRES_ENABLED=false .env.production_site_2export MONGODB_ENABLED=false
export POSTGRES_ENABLED=true They could use it in the context of https://direnv.net/ (or similar tools) to load it per environment, setting per-environment config according to The Twelve-Factor App (https://12factor.net/config more specifically). The example from create-react-app are shell files, see https://github.com/facebook/create-react-app/blob/d960b9e38c062584ff6cfb1a70e1512509a966e7/packages/react-scripts/fixtures/kitchensink/template/.env (where one can see |
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.
Thank you for the details. Just one more question.
filenamePatterns
for .env*
filenamePatterns
for .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.
Thank you for the change!
* Add shellscript `filenamePatterns` for `.env*` In some cases, projects use `.env` files such as `.env.development` or `.env.production` or similar things. Adding this to extensions/shellscript/package.json as a `filenamePatterns` avoids developers having to add specific `"files.associations"` to their VS Code settings files. Fixes microsoft#173425 * Change pattern from .env* to .env.*
In some cases, projects use
.env
files such as.env.development
or.env.production
or similar things.Adding this to extensions/shellscript/package.json as a
filenamePatterns
avoids developers having to add specific"files.associations"
to their VS Code settings files.Fixes #173425