Nextjs, concurrently, and terminal coloring

I avoided using concurrently for a while, to follow advice that I had run across that noted that output coloring would be lost from rescript compiler. I finally got sick of always running two terminals with next dev and bsb -make-world -w, and started using concurrently, on a project that uses nextjs and rescript.

Is there any plan on getting rescript cli to integrate smoothly with concurrently?

1 Like

can you give more details?

You can see the following doesn’t color the output (when bsb is run under concurrently using npx concurrently "npx bsb -make-world -w" "next dev"):

image

and this snippet does color, when using bsb directly:

image

(Note: This is very minor and I have an easy work around. I’m just noting it in case someone is motivated to work on this later.)

Hi, this is expected behavior.
There is a work around to get color for script mode,

NINJA_ANSI_FORCED=1 npx concurrently ‘npx rescript’

see the pic

2 Likes

@kanishka btw, if you use our VSCode or vim plugin, you could let the plugin run bsb -w implicitly for you. Does that work?

Thanks, but I prefer having explicit control over the process, so I will go with NINJA_ANSI_FORCED .

1 Like