Turning progress display off globally for angular-cli v6
Asked Answered
N

1

1

Upgraded to Angular 6. Now I want to turn progress display off globally for ng build. However, the documentation about the ng config command which apparently replaced ng set/get seems to be missing or out-of-date. I think I need to do the following:

ng config --global some.path.progress false

But I can't figure out what the some.path part needs to be. Whatever I try I get an "Invalid path" error.

Of course I could also just edit ~/.angular.json, if I knew what the right hierarchy of keys was. This doesn't work:

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

Within a specific angular.json file, the progress option works if placed under options key inside build. However, it seems to be ignored in the ~/.angular.json file even if included inside options.

Nureyev answered 5/5, 2018 at 8:41 Comment(0)
R
2

You cannot set a build progress option at a global level.

The only CLI options that you can set at a global level are the following. I gleaned this from the code here.

cli.warnings.versionMismatch (boolean)
cli.warnings.typescriptMismatch (boolean)
cli.defaultCollection (string)
cli.packageManager (string)

You can set this option at the project level (as you said in your post). This is the command you would use to do that.

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

Or

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

Of course, set the property to true to turn progress back on.

Rocha answered 5/5, 2018 at 13:13 Comment(2)
Thanks. Not allowing that seems like a questionable and arbitrary design decision.Nureyev
I agree. I think they should expand what can be set globally, at a minimum for defaults when creating a new project.Rocha

© 2022 - 2024 — McMap. All rights reserved.