全局关闭 angular-cli v6 的进度显示

Turning progress display off globally for angular-cli v6

升级到Angular 6. 现在我想全局关闭 ng build 的进度显示。但是,关于 ng config 命令的文档显然已替换 ng set/get 似乎丢失或已过时。我想我需要做以下事情:

ng config --global some.path.progress false

但我不知道 some.path 部分需要是什么。无论我尝试什么,我都会收到 "Invalid path" 错误。

当然我也可以只编辑 ~/.angular.json,如果我知道正确的键层次是什么的话。这不起作用:

{
  "version": 1,
  "cli": {
    "defaults": {
      "build": {
        "progress": false
      }
    }
  }
}

在特定的 angular.json 文件中,如果将 progress 选项放在 build 内的 options 键下,则该选项有效。然而,它似乎在 ~/.angular.json 文件中被忽略,即使包含在 options.

中也是如此

您不能在全局级别设置构建进度选项。

您可以在全局级别设置的唯一 CLI 选项如下。我从代码 here.

中收集到了这个
cli.warnings.versionMismatch (boolean)
cli.warnings.typescriptMismatch (boolean)
cli.defaultCollection (string)
cli.packageManager (string)

您可以在项目级别设置此选项(如您在 post 中所说)。这是您用来执行此操作的命令。

ng config projects['projectname'].architect.build.options.progress false

ng config projects.projectname.architect.build.options.progress false

当然,将 属性 设置为 true 以重新打开进度。