You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/content/docs/guide/getting-started.mdx
+58-1Lines changed: 58 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,64 @@ syncpack list --help
137
137
138
138
## Configuration
139
139
140
-
Create a `.syncpackrc` file in your repo root to customise behaviour. See [Configuration](CONFIG_SYNCPACKRC) for all options.
140
+
Create a [.syncpackrc](CONFIG_SYNCPACKRC) file in the root of your repo to customise behaviour. One way to get started is to focus on production dependencies, then gradually broaden out as you feel comfortable. This is done using [`Version Groups`](CONFIG_VERSION_GROUPS).
141
+
142
+
```json
143
+
{
144
+
"versionGroups": [
145
+
{
146
+
"label": "Sync all production dependencies",
147
+
"dependencyTypes": ["prod"]
148
+
},
149
+
{
150
+
"label": "Ignore everything else",
151
+
"isIgnored": true
152
+
}
153
+
]
154
+
}
155
+
```
156
+
157
+
Or you could focus on specific dependencies and fix those first:
158
+
159
+
```json
160
+
{
161
+
"versionGroups": [
162
+
{
163
+
"label": "Sync react dependencies only",
164
+
"dependencies": ["react", "react-dom"],
165
+
"dependencyTypes": ["prod"]
166
+
},
167
+
{
168
+
"label": "Ignore everything else",
169
+
"isIgnored": true
170
+
}
171
+
]
172
+
}
173
+
```
174
+
175
+
### `workspace:*` dependencies
176
+
177
+
This is a popular configuration which ensures that `workspace:*` is always used when you depend on a package which is developed in your monorepo.
178
+
179
+
```json
180
+
{
181
+
"versionGroups": [
182
+
{
183
+
"label": "Use `workspace:*` protocol for local packages",
184
+
// for packages developed in your monorepo
185
+
"dependencies": ["$LOCAL"],
186
+
// when they are installed as prod or dev dependencies
187
+
"dependencyTypes": ["dev", "prod"],
188
+
// always use the workspace protocol to reference them
0 commit comments