Skip to content
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

feat: add .env-example #587

Merged
merged 4 commits into from
Oct 7, 2022
Merged

feat: add .env-example #587

merged 4 commits into from
Oct 7, 2022

Conversation

c-ehrlich
Copy link
Member

Closes #585

✅ Checklist

  • I have followed every step in the contributing guide (updated 2022-10-06).
  • The PR title follows the convention we established conventional-commit
  • I performed a functional test on my final commit

IIRC we only generated .env-example a while ago, and changed it to .env so that the app could be immediately started after scaffolding. Will close this PR if anyone has a good reason why we shouldn't include both .env and .env-example by default.


Changelog

  • Creates a .env-example file with the same content as the normal .env file plus a warning about not putting secrets in there.
  • Moves the if (!envFile) return; guard clause up a few lines to prevent pointlessly generating the envContent before not saving it to anywhere.

Screenshots

image

💯

@changeset-bot
Copy link

changeset-bot bot commented Oct 7, 2022

🦋 Changeset detected

Latest commit: eb754ee

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
create-t3-app ✅ Ready (Inspect) Visit Preview Oct 7, 2022 at 3:33PM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 100
🟢 Accessibility 100
🟢 Best practices 93
🟠 SEO 86
🟠 PWA 54

Lighthouse ran on https://create-t3-app-git-fork-c-ehrlich-env-example-t3-oss.vercel.app/

Copy link
Member

@nexxeln nexxeln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some text explaining whats the purpose or .env-example, its to keep a list of all the env vars and when someone (even you) clones the repo they can easily figure out what env vars need to be specified.

@nexxeln nexxeln merged commit 8c0267f into t3-oss:next Oct 7, 2022
@juliusmarminge
Copy link
Member

Should be added to the docs too perhaps?

devvianto605 pushed a commit to devvianto605/create-devviantex-nextjs-app-deprecated that referenced this pull request Jun 9, 2024
* add .env-example

* chore: changeset

* expand .env-example explanation

Co-authored-by: Shoubhit Dash <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📌 area: cli Relates to the CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: make env vars optional
3 participants