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

Fixed broekn links #125

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 1 commit into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pages/docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Frequently Asked Questions

## Do I have to use Remote Caching to use Turborepo?

No. [Remote Caching](/docs/features/remote-caching) is optional. However, you'll find it very useful to speed up development on a team, speed up builds inside of Docker, and also save space on your own machine.
No. [Remote Caching](./features/remote-caching) is optional. However, you'll find it very useful to speed up development on a team, speed up builds inside of Docker, and also save space on your own machine.

## Does Turborepo / Remote Caching store my source code?

Expand Down
12 changes: 6 additions & 6 deletions docs/pages/docs/features/caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import Callout from "../../../components/callout";

Unlike other tools you may have used, `turbo` can cache emitted files and logs of previously run commands. It does this so it can skip work that's already been done, yielding incredible time savings.

By default, [`turbo run`](./reference/command-line-reference#turbo-run-task1-task2) considers any files emitted in the `dist/**` or `build/**` folders of a package task (defined in that package's `package.json` `scripts` object) to be cacheable. In addition, `turbo run` treats logs (`stderr` and`stdout`), which are automatically written to `.turbo/run-<command>.log`, as a cacheable artifact. By treating logs as artifacts, you can cache just about any command in your Turborepo.
By default, [`turbo run`](../reference/command-line-reference#turbo-run-task1-task2-1) considers any files emitted in the `dist/**` or `build/**` folders of a package task (defined in that package's `package.json` `scripts` object) to be cacheable. In addition, `turbo run` treats logs (`stderr` and`stdout`), which are automatically written to `.turbo/run-<command>.log`, as a cacheable artifact. By treating logs as artifacts, you can cache just about any command in your Turborepo.

## Configuring Cache Outputs

Using [`pipeline`](./reference/configuration#pipeline), you can configure cache conventions across your Turborepo.
Using [`pipeline`](../reference/configuration#pipeline), you can configure cache conventions across your Turborepo.

To override the default cache folder behavior, pass an array of globs to a [`pipeline.<task>.outputs`](./reference/configuration#outputs) array. Any file that satifies the glob patterns for a task will be treated as artifact.
To override the default cache folder behavior, pass an array of globs to a [`pipeline.<task>.outputs`](../reference/configuration#outputs) array. Any file that satifies the glob patterns for a task will be treated as artifact.

```json
{
Expand Down Expand Up @@ -61,7 +61,7 @@ Sometimes you really don't need or want this cache behavior (such as when you're
turbo run dev --parallel --no-cache
```

You can also always disable caching on a specific task by setting `cache` to `false` in your Turborepo [`pipeline`](./reference/configuration#pipeline):
You can also always disable caching on a specific task by setting `cache` to `false` in your Turborepo [`pipeline`](../reference/configuration#pipeline-1):

```json
{
Expand Down Expand Up @@ -95,13 +95,13 @@ By now, you're probably wondering how `turbo` decides what constitutes a cache h

First `turbo` constructs a hash of the current global state of the monorepo:

- The contents of any file that satifies the the glob patterns in [`globalDependencies`](./reference/configuration#globalDependencies)
- The contents of any file that satifies the the glob patterns in [`globalDependencies`](../reference/configuration#globalDependencies-1)

Then it adds on more factors relative to a given package's task:

- Hash the contents of all not-gitignored files in the package folder
- The hashes of all internal dependencies
- The `outputs` option specified in the [`pipeline`](./reference/configuration#pipeline)
- The `outputs` option specified in the [`pipeline`](../reference/configuration#pipeline)
- The set of resolved versions of all installed `dependencies`, `devDependencies`, and `optionalDependencies` specified in a package's `package.json` from the root lockfile
- The package task's name

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/features/pipelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Notice that `turbo` is able to schedule tasks efficiently--collapsing waterfalls

To define your project's task dependency graph, use the [`pipeline`](../reference/configuration#pipeline) key in the root `package.json`'s `turbo` configuration. `turbo` interprets this configuration and conventions to properly schedule, execute, and cache the outputs of the tasks in your project.

Each key in the [`pipeline`](../reference/configuration#pipeline) object is the name of a task that can be executed by [`turbo run`](../reference/command-line-reference#turbo-run-task1-task2). You can specify its dependencies with the [`dependsOn`](../reference/configuration#dependson) key beneath it as well as some other options related to [caching](./caching).
Each key in the [`pipeline`](../reference/configuration#pipeline) object is the name of a task that can be executed by [`turbo run`](../reference/command-line-reference#turbo-run-task1-task2-1). You can specify its dependencies with the [`dependsOn`](../reference/configuration#dependson) key beneath it as well as some other options related to [caching](./caching).

An example Pipeline configuration:

Expand Down Expand Up @@ -89,7 +89,7 @@ What you are declaring here in the `pipeline` object of the `turbo` configuratio

### Topological Dependency

The `^` symbol explicitly declares that the task has a [package-topological](./glossary#topological-order) dependency on another task.
The `^` symbol explicitly declares that the task has a [package-topological](../glossary#topological-order-1) dependency on another task.

A common pattern in many TypeScript monorepos is to declare that a package's `build` task (e.g. `tsc`) should only run once the `build` tasks of all of its dependencies in the monorepo have run their own `build` tasks. This type of relationship can be expressed as follows:

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Your pipeline both defines the way in which your NPM `package.json` scripts rela

In the above example, the `build` and `test` tasks are dependant on their packages `dependancies` and `devDependancies` being built first, this is denoted with the `^` prefix.

For each script in each workspace's `package.json`, Turborepo will cache files outputted to `dist/**` and `build/**` folders by default if an override isn't added. Using the [`outputs`](./features/caching#configuring-cache-outputs) array allows you to override the default cache folders,
For each script in each workspace's `package.json`, Turborepo will cache files outputted to `dist/**` and `build/**` folders by default if an override isn't added. Using the [`outputs`](./features/caching#configuring-cache-outputs-1) array allows you to override the default cache folders,
like in the example above, where the `.next/**` folder is selected to be the default cache folder for the `build` task. Turborepo will automatically record and cache logs to `.turbo/turbo-<script>.log` for you, so you don't ever need to specify that in the `outputs` array.

Finally, the `dev` task has it's chaching disabled using the `cache` key with a value of `false`.
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can configure the behavior of `turbo` by adding a `turbo` object in the `pac

`type: string`

Defaults to `origin/master`. The base branch or your git repository. Git is used by `turbo` in its [hashing algorithm](../features/caching#hashing) and [`--since` CLI flag](./command-line-reference#--since-1).
Defaults to `origin/master`. The base branch or your git repository. Git is used by `turbo` in its [hashing algorithm](../features/caching#hashing-1) and [`--since` CLI flag](./command-line-reference#--since-1).

## `globalDependencies`

Expand Down Expand Up @@ -133,7 +133,7 @@ Passing an empty array can be used to tell `turbo` that a task is a side-effect

`type: boolean`

Defaults to `true`. Whether or not to cache the task [`outputs`](#outputs). Setting `cache` to false is useful for daemon or long-running "watch" or development mode tasks that you don't want to cache.
Defaults to `true`. Whether or not to cache the task [`outputs`](#outputs-1). Setting `cache` to false is useful for daemon or long-running "watch" or development mode tasks that you don't want to cache.

**Example**

Expand Down