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

Minor editorial, grammatical, and spelling improvments to docs #1701

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 31 commits into from
Aug 22, 2022

Conversation

mehulkar
Copy link
Contributor

Today I read all of turborepo.org/docs and attempted to make improvements based on my own understanding. This was mostly an exercise for myself to understand the product. If there are any changes here that aren't obviously improvements, factually incorrect, or problematic in some other way, please let me know and I can either pull them into a separate PR for more discussion or revert them entirely.

The goal of this PR is not to change any top level information architecture or create cause for debate, but to make cosmetic improvements that should be pretty easily mergeable!

Here's a list of other things I noticed while reading the docs: https://www.notion.so/vercel/Turborepo-Docs-Reading-Notes-6db4a7c38c29476986cfac67353e21ba

@vercel
Copy link

vercel bot commented Aug 16, 2022

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

1 Ignored Deployment
Name Status Preview Updated
turbo-site ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2022 at 5:53PM (UTC)

@mehulkar mehulkar marked this pull request as ready for review August 16, 2022 03:07
@mehulkar mehulkar added the area: docs Improvements or additions to documentation label Aug 16, 2022
@mehulkar mehulkar requested a review from a team August 16, 2022 15:30
@gsoltis gsoltis added the pr: on hold Pull requests that are "on hold" and should not be merged label Aug 16, 2022
@gsoltis
Copy link
Contributor

gsoltis commented Aug 16, 2022

Added "on-hold" just to prevent auto-merge. @mehulkar remove once you get your approvals

@mehulkar

This comment was marked as outdated.


- Hash the contents of all not-gitignored files in the package folder or the files matching the `inputs` globs, if present
- Hash the contents of all version-controlled files in the package folder or the files matching the `inputs` globs, if present
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some feedback from @mirshko in https://github.com/orgs/vercel/discussions/780#discussioncomment-3409321, that we could probably incorporate into this section while I'm here

@mehulkar mehulkar requested a review from timeyoutakeit August 18, 2022 20:11
@mehulkar mehulkar requested a review from MaedahBatool August 19, 2022 16:39
Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

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

A few comments / nits - but overall looks great, thanks for taking a pass!

@tknickman
Copy link
Member

I didn't dig into the previous requested changes, so if I'm suggesting anything contradictory, please ignore!

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
mehulkar and others added 2 commits August 19, 2022 11:52
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Copy link
Contributor

@MaedahBatool MaedahBatool left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback. Overall this LGTM. 👍

@mehulkar mehulkar requested a review from jaredpalmer August 22, 2022 16:12
Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

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

Thanks for addressing those changes!

@mehulkar mehulkar dismissed jaredpalmer’s stale review August 22, 2022 17:01

comment on stale diff

@mehulkar mehulkar removed the pr: on hold Pull requests that are "on hold" and should not be merged label Aug 22, 2022
@mehulkar mehulkar merged commit 9d53d57 into main Aug 22, 2022
@mehulkar mehulkar deleted the mk/docs-nits branch August 22, 2022 18:04
Copy link
Contributor

@nathanhammond nathanhammond left a comment

Choose a reason for hiding this comment

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

Just some things as I'm going back through and catching up.

@@ -146,7 +144,7 @@ Luckily, you can control `turbo`'s cache fingerprinting (a.k.a. hashing) behavio
```

<Callout type="info">
Pro Tip: In most monorepos, you don't often use environment variables in shared packages, but mostly only in applications. Thus, to get higher cache hit rates, you should likely only include environment variables in the app-specific tasks where they are used/inlined.
Pro Tip: It is more common for monorepos to use environment variables in workspaces that contain applications (such as a website) rather than shared packages (such as a UI component library). Thus, to get higher cache hit rates, you should likely only "depend on" environment variables in package-specific tasks in your `turbo.json` configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a really good rewording.

Copy link
Contributor Author

Choose a reason for hiding this comment

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


- Hash the contents of all not-gitignored files in the package folder or the files matching the `inputs` globs, if present
- Hash the contents of all version-controlled files in the package folder or the files matching the `inputs` globs, if present
Copy link
Contributor

Choose a reason for hiding this comment

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

😅 This is actually a bit imprecise because of:

// Instead of implementing all gitignore properly, we hack it. We only respect .gitignore in the root and in
// the directory of a package.

That's something we should fix but that means spending more time plumbing commands through to ask git what it thinks of the world before doing our processing.


To give you a sense of how powerful this can be, the below diagram compares the `turbo` vs `lerna` task execution timelines:
To give you a sense of how powerful this can be, the diagram below compares the `turbo` and `lerna` task execution timelines:
Copy link
Contributor

Choose a reason for hiding this comment

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

We should maybe revisit this diagram without framing it in the context of Lerna.

</Tab>
<Tab>
```bash
yarn add turbo --dev -W
Copy link
Contributor

Choose a reason for hiding this comment

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

In documentation I prefer not using shorthand flags. PR: #1767

@@ -11,16 +11,16 @@ import { Tabs, Tab } from '../../../components/Tabs'

Workspaces are a feature implemented by package managers to assist with working on multiple apps and packages in the same codebase.

Turborepo is compatible with three package managers, [npm](https://docs.npmjs.com/cli/v8/using-npm/workspaces#description), [Yarn](https://classic.yarnpkg.com/lang/en/docs/workspaces/), and [pnpm](https://pnpm.io/workspaces), each with its own implementation of workspaces and functionality. Your package manager will determine how your apps and packages are organized in your workspaces and run in your turborepo.
Turborepo is compatible with three package managers ([npm](https://docs.npmjs.com/cli/v8/using-npm/workspaces#description), [Yarn 1](https://classic.yarnpkg.com/lang/en/docs/workspaces/), and [pnpm](https://pnpm.io/workspaces)), each with its own implementation of workspaces and functionality. Your package manager will determine how your apps and packages are organized in your workspaces and run in your turborepo.
Copy link
Contributor

Choose a reason for hiding this comment

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

We support Berry just fine if you actually don't use the primary Berry feature...

- **Cloud caching**: Share a cloud build cache with your teammates and CI/CD for even faster builds.
- **Parallel execution**: Execute builds using every core at maximum parallelism without wasting idle CPUs.
- **Zero runtime overhead**: Turborepo doesn't interfere with your runtime code or touch your sourcemaps. It does what it does and then gets out of your way.
- **Task pipelines**: Define the relationships between your tasks and then let Turborepo optimize what to build and when.
- **Pruned subsets**: Speed up PaaS deploys by generating a subset of your monorepo with only what's needed to build a specific target.
- **Convention-based config**: Reduce complexity through convention. Fan out configuration with just a few lines of JSON.
- **Profile in your browser**: Generate build profiles and import them in Chrome or Edge to understand which tasks are taking the longest.
- **Profile in your browser**: Generate build profiles and view them in a browser to understand which tasks are taking the longest.
Copy link
Contributor

Choose a reason for hiding this comment

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

This was actually correct previously. This generates a file compatible with about:tracing in (most) Chromium-based browsers.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can load these trace files into a lot of things; I'm going to be less specific, but still provide context about what it is: #1768

@@ -200,7 +200,7 @@ Defaults to `[]`. Tells `turbo` the set of files to consider when determining if
Setting this to a list of globs will cause the task to only be rerun when files matching those globs have
changed. This can be helpful if you want to, for example, skip running tests unless a source file changed.

Specifying `[]` will cause the task to be rerun when any file changes.
Specifying `[]` will cause the task to be rerun when any version-controlled file in the workspace changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above. We shouldn't change this since that is (at least aspirationally) what it should do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants