Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTierney Cyren <hello@bnb.im>2022-02-16 19:35:50 +0300
committerGitHub <noreply@github.com>2022-02-16 19:35:50 +0300
commit408d2fc150185ef66125f7d6bdb1c25edb71bba3 (patch)
tree6d5a8148a587152246d08397cd9a3dd8c45f7900 /docs
parent20378c67cd533db514dd2aec7828c6d119e9d6c7 (diff)
docs: update workspaces guide for consistency (#4426)
Signed-off-by: Tierney Cyren <hello@bnb.im>
Diffstat (limited to 'docs')
-rw-r--r--docs/content/using-npm/workspaces.md18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/content/using-npm/workspaces.md b/docs/content/using-npm/workspaces.md
index c2ecce5ef..26d6a5d75 100644
--- a/docs/content/using-npm/workspaces.md
+++ b/docs/content/using-npm/workspaces.md
@@ -30,24 +30,25 @@ Workspaces are usually defined via the `workspaces` property of the
{
"name": "my-workspaces-powered-project",
"workspaces": [
- "workspace-a"
+ "packages/a"
]
}
```
Given the above `package.json` example living at a current working
-directory `.` that contains a folder named `workspace-a` that itself contains
+directory `.` that contains a folder named `packages/a` that itself contains
a `package.json` inside it, defining a Node.js package, e.g:
```
.
+-- package.json
-`-- workspace-a
- `-- package.json
+`-- packages
+ +-- a
+ | `-- package.json
```
The expected result once running `npm install` in this current working
-directory `.` is that the folder `workspace-a` will get symlinked to the
+directory `.` is that the folder `packages/a` will get symlinked to the
`node_modules` folder of the current working dir.
Below is a post `npm install` example, given that same previous example
@@ -56,11 +57,12 @@ structure of files and folders:
```
.
+-- node_modules
-| `-- workspace-a -> ../workspace-a
+| `-- packages/a -> ../packages/a
+-- package-lock.json
+-- package.json
-`-- workspace-a
- `-- package.json
+`-- packages
+ +-- a
+ | `-- package.json
```
### Getting started with workspaces