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: packages/lerna/src/commands/add-caching/README.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,9 @@ If you mark `build` as needing topological order, the `nx.json` file will look l
32
32
}
33
33
```
34
34
35
+
> **Note:** Before running `add-caching`, Lerna assumes that all scripts need to be run in order.
36
+
> After running `add-caching`, Lerna will only run scripts in order if they are marked as needing topological order.
37
+
35
38
### Which scripts are cacheable?
36
39
37
40
Each script selected will be cached by Lerna. Only select scripts that do not depend on any external inputs (like network calls). `build` and `test` are usually cacheable. `start` and `serve` are usually not cacheable. Sometimes `e2e` is cacheable.
@@ -40,14 +43,9 @@ If you mark `build` as cacheable, the `nx.json` file will look like this:
Copy file name to clipboardExpand all lines: website/docs/concepts/task-pipeline-configuration.md
-16Lines changed: 0 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,22 +24,6 @@ following:
24
24
npx lerna run build --concurrency=5
25
25
```
26
26
27
-
Note, you can also change the default in `nx.json`, like this:
28
-
29
-
```json title="nx.json"
30
-
{
31
-
"tasksRunnerOptions": {
32
-
"default": {
33
-
"runner": "nx/tasks-runners/default",
34
-
"options": {
35
-
"cacheableOperations": [],
36
-
"parallel": 5
37
-
}
38
-
}
39
-
}
40
-
}
41
-
```
42
-
43
27
## Define Task Dependencies (aka Task Pipelines)
44
28
45
29
Without our help Lerna cannot know what targets (scripts) have prerequisites and which ones don't. You can define task dependencies in the `nx.json` file:
0 commit comments