| 3 | import color from 'picocolors'; |
| 4 | |
| 5 | async function main() { |
| 6 | console.clear(); |
| 7 | |
| 8 | await setTimeout(1000); |
| 9 | |
| 10 | p.intro(`${color.bgCyan(color.black(' create-app '))}`); |
| 11 | |
| 12 | await p.stream.step( |
| 13 | (async function* () { |
| 14 | for (const line of lorem) { |
| 15 | for (const word of line.split(' ')) { |
| 16 | yield word; |
| 17 | yield ' '; |
| 18 | await setTimeout(200); |
| 19 | } |
| 20 | yield '\n'; |
| 21 | if (line !== lorem.at(-1)) { |
| 22 | await setTimeout(1000); |
| 23 | } |
| 24 | } |
| 25 | })() |
| 26 | ); |
| 27 | |
| 28 | p.outro(`Problems? ${color.underline(color.cyan('https://example.com/issues'))}`); |
| 29 | } |
| 30 | |
| 31 | const lorem = [ |
| 32 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |