Function
init
({clear, title, version, tagLine, description})
Source from the content-addressed store, hash-verified
| 2 | import clearConsole from 'clear-any-console'; |
| 3 | |
| 4 | export function init({clear, title, version, tagLine, description}) { |
| 5 | clear && clearConsole(); |
| 6 | const bg = chalk.hex('#6CC644').inverse.bold; |
| 7 | const clr = chalk.hex(`#000000`).bold; |
| 8 | |
| 9 | console.log(); |
| 10 | console.log( |
| 11 | `${clr(`${bg(` ${title} `)}`)} v${version} ${chalk.dim(tagLine)}\n${chalk.dim( |
| 12 | description, |
| 13 | )}`, |
| 14 | ); |
| 15 | console.log(); |
| 16 | } |
Tested by
no test coverage detected