wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.48k stars 1.18k forks source link

Improved default gitignore regarding .env rules. #2083

Closed Martinsos closed 3 months ago

Martinsos commented 3 months ago

Inspired by and solves this PR https://github.com/wasp-lang/wasp/pull/1678 and some dotenv reading lately, I improved our default Wasp gitignore to have better rules for dotenv files.

Now it doesn't ignore .env.client.example and .env.server.example and any other dotenv example files. Also, it doesn't ignore .env.client any more, because there is no need -> no secrets are anyway allowed in that file, and it can be committed to version control. Finally, I relaxed ignoring of all dotenv files a bit -> it is enough to ignore those with .env prefix, not all that contain .env. anywhere inside of them, that was a bit too aggressive I think.

I also updated the docs with info on .env.client, explaining it can be versioned.

Pls let me know if this is ok, if so, I will proceed updating all the example apps with this and then merging.

TODO:

Martinsos commented 3 months ago

@infomiho I took care of all the comments + updated all the examples apps + open saas (in separate PR) + updated Changelog. Will be merging now!