Skip to content

Commit 104e069

Browse files
committed
docs(site): update getting started guide
1 parent 02d3586 commit 104e069

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

site/src/content/docs/guide/getting-started.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ Some of the things it can do are:
2323

2424
The fastest way to try syncpack is via [npx](HREF_NPX).
2525

26-
Run this command from the root directory of a monorepo and it will list every dependency installed under a [`dependencies`](HREF_DEPENDENCIES) property of a package.json file in the project.
27-
28-
Syncpack uses your package manager's workspace configuration to locate your package.json files, or you can target specific files using the [`source`](CONFIG_SOURCE) configuration or `--source` option.
29-
3026
```bash
3127
npx syncpack@alpha list --dependency-types prod
3228
```
3329

30+
Run this command from the root directory of a monorepo and it will list every dependency installed under a [`dependencies`](HREF_DEPENDENCIES) property of a package.json file in the project.
31+
32+
Syncpack uses your package manager's workspace configuration to locate your package.json files, or you can target specific files using the [`source`](CONFIG_SOURCE) configuration or `--source` option.
33+
3434
For any given command, browse a summary of its options with `-h`
3535

3636
```bash
@@ -60,24 +60,16 @@ npm exec syncpack -- list
6060
## Introduction
6161

6262
:::note
63-
64-
For the rest of this guide I will run syncpack as if it was installed globally
65-
66-
```
67-
npm install -g syncpack@alpha
68-
```
69-
63+
The examples below assume syncpack is installed globally. Replace `syncpack` with `npx syncpack@alpha` if you haven't installed it or `npm exec syncpack` if you have installed it locally.
7064
:::
7165

72-
We're going to run a few commands to better understand not only syncpack, but our own project as well. Monorepos can be _huge_, it's not easy to drill down and see all of the many dependencies we might be using, and harder still to know where any inconsistencies are.
73-
7466
Let's see which dependencies we use the most.
7567

7668
```bash
7769
syncpack list --dependency-types prod --sort count
7870
```
7971

80-
Some of our dependencies might have errors next to them, if our Terminal supports it we can command + click each error to view its documentation, or each filename to open the file.
72+
Some of our dependencies might have [status codes](REF_STATUS_CODES) next to them, if our Terminal supports it we can command + click each error to view its documentation, or each filename to open the file.
8173

8274
To focus only on dependencies with errors, use `lint` instead of `list`.
8375

@@ -91,6 +83,10 @@ If the suggested changes look ok, we can autofix them.
9183
syncpack fix --dependency-types prod
9284
```
9385

86+
:::tip
87+
After running `fix` or `update`, run your package manager (`npm install`, `pnpm install`, etc.) to update your lockfile.
88+
:::
89+
9490
Or we could choose to only autofix one of them, for this example I've chosen `react`.
9591

9692
```bash
@@ -133,12 +129,16 @@ And by removing the `--check` option we can write the newer versions to our file
133129
syncpack update --dependencies react
134130
```
135131

136-
I'm hoping by this point that you're starting to develop an intuition for how syncpack works and how its options can be combined. Take a look at the `--help` documentation of each command to see examples and what options are available.
132+
Each command supports `--help` for examples and available options.
137133

138134
```bash
139135
syncpack list --help
140136
```
141137

138+
## Configuration
139+
140+
Create a `.syncpackrc` file in your repo root to customise behaviour. See [Configuration](CONFIG_SYNCPACKRC) for all options.
141+
142142
## Further reading
143143

144144
1. Read the [`Peer Dependencies`](GUIDE_PEER_DEPENDENCIES) guide if your projects uses them, it will be important to understand them from a version consistency point of view.

0 commit comments

Comments
 (0)