Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gruntjs 如何从Grunt输出中删除所有颜色信息?_Gruntjs_Build Automation - Fatal编程技术网

Gruntjs 如何从Grunt输出中删除所有颜色信息?

Gruntjs 如何从Grunt输出中删除所有颜色信息?,gruntjs,build-automation,Gruntjs,Build Automation,我对Grunt有点陌生,正在我们的自动构建系统(在Windows上)中使用它。在控制台中手动运行Grunt时,颜色非常有用。但是,在自动设置中运行时,会在生成日志中显示颜色信息,如下所示: [4mRunning "sass:all" (sass) task [24m 额外的字符会降低构建日志的可读性,我想去掉它们 我知道单个字符串的方法,但是我想知道是否有一种方法可以配置Grunt来输出所有没有颜色信息的日志,或者是否有一个现有的插件来实现这一点。如果没有,我可能会编写自己的插件 我觉得这种情

我对Grunt有点陌生,正在我们的自动构建系统(在Windows上)中使用它。在控制台中手动运行Grunt时,颜色非常有用。但是,在自动设置中运行时,会在生成日志中显示颜色信息,如下所示:

[4mRunning "sass:all" (sass) task [24m
额外的字符会降低构建日志的可读性,我想去掉它们

我知道单个字符串的方法,但是我想知道是否有一种方法可以配置Grunt来输出所有没有颜色信息的日志,或者是否有一个现有的插件来实现这一点。如果没有,我可能会编写自己的插件


我觉得这种情况很常见——在自动化系统中使用Grunt,您希望以纯文本的形式读取构建日志——所以可能我遗漏了一些东西。

当然,在问了这个问题之后,我终于找到了答案

使用简单的命令行选项
--无颜色


我正在浏览API,但不知怎的错过了文档的部分。

有没有办法在Gruntfile.js中指定这一点?