wallabyjs / quokka

Repository for Quokka.js questions and issues
https://quokkajs.com
1.18k stars 31 forks source link

Support output colors #882

Open davestewart opened 1 year ago

davestewart commented 1 year ago

Issue description or question

Quokka output does not seem to support color formatting, whereas WebStorm and Terminal do.

Colours are really helpful for inspecting larger objects / arrays / config / etc.

Is this issue related to Quokka not outputting the expected results of your code?

Yes

Sample code

const { inspect } = require('util')

function log (value, colors = false) {
  console.log(inspect(value, { colors }))
}

const values = [ 1, 'foo', true ]

log (values)
log (values, true)

Quokka.js Console Output

image

WebStorm Terminal Output

image

Code editor version

WebStorm 2023.1

OS name and version

OSX Monterey 12.6