elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

Do a separate isTerminal checking for stdout and stderr. #97

Closed abadi199 closed 8 years ago

abadi199 commented 8 years ago

I think having a separate isTerminal checking for stdout and stderr is necessary. One use case for this is when running elm-make from nodejs, we can choose to ignore/pipe stdout, but not the stderr in order to keep the ansi color on the compiler error message, e.g.:

spawn('elm-make', args, {stdio: ['ignore', 'ignore', process.stderr]})

If we only check for stdout, in the above scenario, the compiler error message will be displayed without the ansi color.

I believe this PR will also solve this issue #70