Skip to content

Commit 05882fc

Browse files
authored
docs: update pnpm workspace example in docs to avoid edge cases (#2111)
1 parent 868f12d commit 05882fc

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

docs/README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,15 @@ $ bazel fetch @npm//...
109109

110110
### Using pnpm workspaces
111111

112-
Here's an example `pnpm-workspace.yaml` file which will automatically discover all packages in the repository, based on the existence of a `package.json` file.
112+
Here's an example `pnpm-workspace.yaml` file which will find all projects under `apps` or `packages` at any depth, and anything directly under `tools`, based on the existence of a `package.json` file.
113+
113114
Make sure to place this file at the root of the repository.
114115

115116
```yaml
116117
packages:
117-
# Include all directories in the workspace
118-
- '*'
119-
# Include all subdirectories at any depth
120-
- '**/*'
121-
# Exclude node_modules folders anywhere in the tree
122-
- '!**/node_modules/**'
123-
# Exclude node_modules folder in root
124-
- '!node_modules'
125-
# Exclude anything inside bazel dirs
126-
- '!bazel-*/**'
118+
- 'apps/**'
119+
- 'packages/**'
120+
- 'tools/*'
127121
```
128122
129123
### Link the node_modules

0 commit comments

Comments
 (0)