MCPcopy Index your code
hub / github.com/bombshell-dev/clack / main

Function main

examples/basic/task-log.ts:4–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import * as p from '@clack/prompts';
3
4async function main() {
5 p.intro('task log start...');
6
7 const log = p.taskLog({
8 title: 'Running npm install',
9 limit: 5,
10 });
11
12 for await (const line of fakeCommand()) {
13 log.message(line);
14 }
15
16 log.success('Done!');
17
18 p.outro('task log stop...');
19}
20
21async function* fakeCommand() {
22 for (let i = 0; i < 100; i++) {

Callers 1

task-log.tsFile · 0.70

Calls 2

fakeCommandFunction · 0.85
messageMethod · 0.80

Tested by

no test coverage detected