allegro / grunt-maven-plugin

Grunt + Maven integration done right
Other
213 stars 32 forks source link

Syntax Coloring #3

Closed robianmcd closed 11 years ago

robianmcd commented 11 years ago

Thanks for the great plugin!

When I run grunt from maven with your plugin I don't get any syntax coloring in my shell. I just get output like this:

[4mRunning "watch" task Waiting...OK

If I run Grunt directly then I do get the coloring. Not sure if this is because I'm using windows or if this is a maven thing. Think there would be any work around for this?

Thanks

adamdubiel commented 11 years ago

When you run Grunt in shell, it writes to stdout and it takes care of nice coloring. Try forwarding Grunt output to file

grunt > output

and you will see that it is just as messed up as what you posted. Maven behaves like output file, taking all characters that Grunt outputs without interpreting shell escape sequences that provide colors. Fix for now is to disable colored output using:

module.exports = function(grunt) {
    grunt.option('color', false);
    /*...*/
}

I will add configuration option to automatically disable colors in grunt-maven output in 1.0.2 release.

robianmcd commented 11 years ago

Ah alright thanks for the info!

adamdubiel commented 11 years ago

I will keep this opened as enhancement for 1.0.2 milestone.