Skip to content

Commit 8ba0532

Browse files
committed
doc: add Tasks
1 parent 9acccde commit 8ba0532

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/prompts/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,19 @@ const group = await p.group(
156156

157157
console.log(group.name, group.age, group.color);
158158
```
159+
160+
### Tasks
161+
162+
Execute multiple tasks in spinners.
163+
164+
```js
165+
await p.tasks([
166+
{
167+
title: 'Installing via npm',
168+
task: async (message) => {
169+
// Do installation here
170+
return 'Installed via npm';
171+
},
172+
},
173+
]);
174+
```

0 commit comments

Comments
 (0)