Skip to content

Commit

Permalink
docs: Updates for accuracy in Add to Existing Repository page.
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed Nov 4, 2024
1 parent 6d039f7 commit d211a97
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions docs/repo-docs/getting-started/add-to-existing-repository.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,27 @@ Add `.turbo` to your `.gitignore` file. The `turbo` CLI uses these folders for p

</Step>
<Step>
### Run the `build` and `check-types` tasks with `turbo`
### Add a `packageManager` field to root `package.json`

Turborepo optimizes your repository using information from your package manager. To declare which package manager you're using, add a [`packageManager`](https://nodejs.org/api/packages.html#packagemanager) field to your root `package.json` if you don't have one already.

```diff title="package.json"
{
+ "packageManager": "[email protected]"
}
```

</Step>
<Step>
### Run tasks with `turbo`

You can now run the tasks you added to `turbo.json` earlier using Turborepo. Using the example tasks from above:

```bash title="Terminal"
turbo build check-types
```

This runs `build` and `check-types` at the same time.
This runs the `build` and `check-types` tasks at the same time, respecting the dependency graph of your project.

</Step>
<Step>
Expand Down

0 comments on commit d211a97

Please sign in to comment.