diff --git a/docs/pages/docs/faq.mdx b/docs/pages/docs/faq.mdx index f340361f30f7e..c78e6ad3d92d2 100644 --- a/docs/pages/docs/faq.mdx +++ b/docs/pages/docs/faq.mdx @@ -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? diff --git a/docs/pages/docs/features/caching.mdx b/docs/pages/docs/features/caching.mdx index 338eda13060dc..71c64fb9135e3 100644 --- a/docs/pages/docs/features/caching.mdx +++ b/docs/pages/docs/features/caching.mdx @@ -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-.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-.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..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..outputs`](../reference/configuration#outputs) array. Any file that satifies the glob patterns for a task will be treated as artifact. ```json { @@ -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 { @@ -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 diff --git a/docs/pages/docs/features/pipelines.mdx b/docs/pages/docs/features/pipelines.mdx index 71075d101b9e6..7d4ca27daf5a0 100644 --- a/docs/pages/docs/features/pipelines.mdx +++ b/docs/pages/docs/features/pipelines.mdx @@ -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: @@ -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: diff --git a/docs/pages/docs/getting-started.mdx b/docs/pages/docs/getting-started.mdx index cd2921862a56f..41ccc79f9c725 100644 --- a/docs/pages/docs/getting-started.mdx +++ b/docs/pages/docs/getting-started.mdx @@ -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-