-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add related documentation to process output and update with fea…
…ture flag
- Loading branch information
1 parent
e6d6474
commit c1ede63
Showing
3 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { EOL } from 'os' | ||
|
||
import { Listr, ListrLogger, ProcessOutput, delay } from 'listr2' | ||
|
||
const tasks = new Listr( | ||
[ | ||
{ | ||
title: 'This task will execute.', | ||
task: async (): Promise<void> => { | ||
await delay(500) | ||
|
||
console.log('i am logging some stuff out') | ||
} | ||
}, | ||
|
||
{ | ||
title: 'This task will execute.', | ||
task: async (): Promise<void> => { | ||
await delay(500) | ||
|
||
console.log('i am logging some more stuff out') | ||
} | ||
}, | ||
|
||
{ | ||
title: 'This task will execute.', | ||
task: async (): Promise<void> => { | ||
await delay(500) | ||
|
||
process.stdout.write('writing something here' + EOL) | ||
process.stdout.write('writing something here' + EOL) | ||
} | ||
} | ||
], | ||
{ | ||
concurrent: true, | ||
rendererOptions: { | ||
logger: new ListrLogger({ processOutput: new ProcessOutput(null, null, { dump: [] }) }) | ||
} | ||
} | ||
) | ||
|
||
await tasks.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters