3 ms·
> You can log and style CLI output the same way you do it in the browser’s developer tools: using what you know with console.log > console.log("%cHello World",
by mcintyre1994 5y ago
> You can log and style CLI output the same way you do it in the browser’s developer tools: using what you know with console.log
> console.log("%cHello World", "color: red");
TIL, neat! If anyone else did too - https://developer.mozilla.org/en-US/docs/Web/API/console#styling_console_output https://developer.mozilla.org/en-US/docs/Web/API/console#sty... looks great
Using alert/confirm/prompt for CLI tools is nice too, makes a lot of sense to build that in and use the web APIs for it.
- amenghra 5y agoTake a look at the developer console when visiting www.facebook.com
- thoughtpalette 5y agoconsole.trace looks sweet. Thanks for the link.
- brianzelip 5y agoThat’s great, thanks! I was wondering what that `%c` was.