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: plugins/parallel/readme.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,18 @@ commands:
51
51
watch: true
52
52
~~~
53
53
54
-
##### `stopOnError`
54
+
##### `onError`
55
55
56
-
An optional `boolean`, defaulting to `false`. If `true`, when one of the parallel tasks throws an error, `Parallel` will stop the other tasks. This is useful for long-running tasks, e.g. a Node server and Webpack in `watch` mode, where one task erroring means you don't have everything running that you'd expect. If you're using `Parallel` to run shorter tasks in parallel as an optimisation, keep this as the default `false` so every task runs to completion and Tool Kit can show the final results of all the tasks.
56
+
_optional_
57
+
58
+
| Value | Description |
59
+
|-|-|
60
+
| `'wait-for-others'` (default) | If any task errors, wait for the other tasks to complete, and print all the errors at the end. |
61
+
| `'stop-all'` | If any task errors, immediately stop the other tasks, and print the error. |
62
+
63
+
For long-running tasks, e.g. a Node server and Webpack in `watch` mode, it's possible for one task to error, but its error logging to be buried by the other tasks' output, meaning you might have missed an error and aren't aware that not everything you expect to be running is still running. In these cases, set `onError: stop-all`; Tool Kit will exit every `Parallel` task if one of them errors, so you're always in a consistent state and don't miss any errors.
64
+
65
+
If you're using `Parallel` to run shorter tasks in parallel as an optimisation, keep this as the default `wait-for-others` so every task runs to completion and Tool Kit can show the final results of all the tasks.
An optional \`boolean\`, defaulting to \`false\`. If \`true\`, when one of the parallel tasks throws an error, \`Parallel\` will stop the other tasks. This is useful for long-running tasks, e.g. a Node server and Webpack in \`watch\` mode, where one task erroring means you don't have everything running that you'd expect. If you're using \`Parallel\` to run shorter tasks in parallel as an optimisation, keep this as the default \`false\` so every task runs to completion and Tool Kit can show the final results of all the tasks.
35
+
_optional_
36
+
37
+
| Value | Description |
38
+
|-|-|
39
+
| \`'wait-for-others'\` (default) | If any task errors, wait for the other tasks to complete, and print all the errors at the end. |
40
+
| \`'stop-all'\` | If any task errors, immediately stop the other tasks, and print the error. |
41
+
42
+
For long-running tasks, e.g. a Node server and Webpack in \`watch\` mode, it's possible for one task to error, but its error logging to be buried by the other tasks' output, meaning you might have missed an error and aren't aware that not everything you expect to be running is still running. In these cases, set \`onError: stop-all\`; Tool Kit will exit every \`Parallel\` task if one of them errors, so you're always in a consistent state and don't miss any errors.
43
+
44
+
If you're using \`Parallel\` to run shorter tasks in parallel as an optimisation, keep this as the default \`wait-for-others\` so every task runs to completion and Tool Kit can show the final results of all the tasks.
0 commit comments