Skip to content

Commit 408d2fc

Browse files
authored
docs: update workspaces guide for consistency (#4426)
Signed-off-by: Tierney Cyren <hello@bnb.im>
1 parent 20378c6 commit 408d2fc

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

docs/content/using-npm/workspaces.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,25 @@ Workspaces are usually defined via the `workspaces` property of the
3030
{
3131
"name": "my-workspaces-powered-project",
3232
"workspaces": [
33-
"workspace-a"
33+
"packages/a"
3434
]
3535
}
3636
```
3737

3838
Given the above `package.json` example living at a current working
39-
directory `.` that contains a folder named `workspace-a` that itself contains
39+
directory `.` that contains a folder named `packages/a` that itself contains
4040
a `package.json` inside it, defining a Node.js package, e.g:
4141

4242
```
4343
.
4444
+-- package.json
45-
`-- workspace-a
46-
`-- package.json
45+
`-- packages
46+
+-- a
47+
| `-- package.json
4748
```
4849

4950
The expected result once running `npm install` in this current working
50-
directory `.` is that the folder `workspace-a` will get symlinked to the
51+
directory `.` is that the folder `packages/a` will get symlinked to the
5152
`node_modules` folder of the current working dir.
5253

5354
Below is a post `npm install` example, given that same previous example
@@ -56,11 +57,12 @@ structure of files and folders:
5657
```
5758
.
5859
+-- node_modules
59-
| `-- workspace-a -> ../workspace-a
60+
| `-- packages/a -> ../packages/a
6061
+-- package-lock.json
6162
+-- package.json
62-
`-- workspace-a
63-
`-- package.json
63+
`-- packages
64+
+-- a
65+
| `-- package.json
6466
```
6567

6668
### Getting started with workspaces

0 commit comments

Comments
 (0)