That may be a terrible bug title @videege ...I've been trying to figure this out. I don't Angular, so not sure how to go about it.
I updated my environment.ts with my Firebase values so I could control my database. But now my git client has environment.ts as a changed file. So I'm either going to accidentally commit it one day, or I'll accidentally revert it (as I did tonight) and be annoyed that I have to go find the configuration again.
Here's how I'd approach this in another system:
- Have a default file that allows the system to start (but not necessarily work on a random developers machine)
- Allow devs to create their own file for their own configuration (like
environment.dev.ts)
- Don't commit that file
- Add the file to
.gitignore so it can't be accidentally committed, and isn't shown in changed files list
When I try to make this work in Angular, it gives me a very reasonable error about no such file environment.dev.ts (when I delete the file, to simulate a new dev forking the project and wanting to "just get going")