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

Function demo

examples/basic/progress.ts:13–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13async function demo() {
14 p.intro('progress start...');
15
16 const download = p.progress({ style: 'block', max: 10, size: 30 });
17 download.start('Downloading package');
18 await fakeProgress(download);
19 download.stop('Download completed');
20
21 const unarchive = p.progress({ style: 'heavy', max: 10, size: 30, indicator: undefined });
22 unarchive.start('Un-archiving');
23 await fakeProgress(unarchive);
24 unarchive.stop('Un-archiving completed');
25
26 const linking = p.progress({ style: 'light', max: 10, size: 30, indicator: 'timer' });
27 linking.start('Linking');
28 await fakeProgress(linking);
29 linking.stop('Package linked');
30
31 p.outro('progress stop...');
32}
33
34void demo();

Callers 1

progress.tsFile · 0.70

Calls 3

fakeProgressFunction · 0.85
startMethod · 0.80
stopMethod · 0.80

Tested by

no test coverage detected