这是indexloc提供的服务,不要输入任何密码
Skip to content

Cover gitignored env files in docs and examples #3270

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

Merged
merged 9 commits into from
Jan 18, 2023
Merged

Conversation

mehulkar
Copy link
Contributor

This is another take on #2298, adding a special section for dotenv , since it is such a common way of loading environment variables.

@vercel
Copy link

vercel bot commented Jan 11, 2023

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

Name Status Preview Comments Updated
examples-designsystem-docs 🔄 Building (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
9 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Jan 18, 2023 at 1:42PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
turbo-site ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2023 at 1:42PM (UTC)

@github-actions github-actions bot added area: examples Improvements or additions to examples pkg: create-turbo Issues related to npx create-turbo labels Jan 11, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2023

🟢 CI successful 🟢

Thanks

@mehulkar mehulkar marked this pull request as ready for review January 11, 2023 18:54
@mehulkar mehulkar requested a review from a team as a code owner January 11, 2023 18:54
@mehulkar mehulkar requested review from tknickman and arlyon January 11, 2023 18:54
@mehulkar mehulkar added the area: docs Improvements or additions to documentation label Jan 11, 2023
@mehulkar mehulkar requested a review from anthonyshew January 12, 2023 07:05
@arlyon
Copy link
Contributor

arlyon commented Jan 18, 2023

I left a comment on the vercel preview ( currently on mobile). Otherwise looks good :)

@mehulkar mehulkar added the pr: automerge Kodiak will merge these automatically after checks pass label Jan 18, 2023
@mehulkar mehulkar merged commit 22eba5f into main Jan 18, 2023
@mehulkar mehulkar deleted the gitignored-env-files branch January 18, 2023 13:57
@@ -1,5 +1,6 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
Copy link
Contributor

Choose a reason for hiding this comment

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

@mehulkar
Hi
I found that this setting seems to slow down tasks very much.

Tested with turbo 1.9.6 with basic example:

pnpm dlx create-turbo@1.9.6
? Where would you like to create your turborepo? ./my-turborepo
? Which package manager do you want to use? pnpm

Then, run pnpm lint (with cache == full turbo)
It takes 300-400ms.

pnpm lint

(omit)

 Tasks:    3 successful, 3 total
Cached:    3 cached, 3 total
  Time:    366ms >>> FULL TURBO

If I remove the globalDependencies setting:

pnpm lint

(omit)

 Tasks:    3 successful, 3 total
Cached:    3 cached, 3 total
  Time:    55ms >>> FULL TURBO

It is turbo!

If I make the following changes, it is also very fast.
(As much as when I delete globalDependencies.)

-  "globalDependencies": ["**/.env.*local"],
+  "globalDependencies": ["apps/**/.env.*local"],

So I think it may be better to limit the scope of glob.
What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it’s not a great solution for exactly this reason. You can specify all known files yourself or use a more limited glob.

@nathanhammond is also working on a feature to make this a top level configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Improvements or additions to documentation area: examples Improvements or additions to examples pkg: create-turbo Issues related to npx create-turbo pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants