How to remove all color information from grunt output?

I am a little new to Grunt and use it in our automated build system (on Windows). When starting Grunt manually in the console, coloring is extremely useful. However, when launched into automatic configuration, it leads to color information in the build log, for example:

[4mRunning "sass:all" (sass) task [24m 

Additional characters reduce the readability of the assembly log, and I would like to get rid of them.

I know the grunt.log.uncolor method for individual lines, but I wonder if there is a way to configure Grunt to display all the logs without color information or if there is an existing plugin for this. If not, I will most likely write my own plugin.

It seems to me that this would be commonplace - using Grunt in an automated system where you want to read the assembly log as plain text - so maybe I just missed something.

+6
source share
1 answer

Of course, I finally find the answer right after the question ...

Use the simple command line parameter --no-color .

I was looking at the API, but for some reason skipped the "Using CLI" in the documentation.

+8
source

Source: https://habr.com/ru/post/971108/


All Articles