Skip to content

Show default values for each command flag #17191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
12 of 15 tasks
muuvmuuv opened this issue Mar 11, 2020 · 5 comments · Fixed by #22778
Closed
12 of 15 tasks

Show default values for each command flag #17191

muuvmuuv opened this issue Mar 11, 2020 · 5 comments · Fixed by #22778
Labels
area: @angular-devkit/schematics feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Milestone

Comments

@muuvmuuv
Copy link

muuvmuuv commented Mar 11, 2020

🚀 Feature request

Today I started a new NG9 project and first things first I have set up CLI commands, packages and so on. While doing that, I was wondering what defaults are being set by the CLI and couldn't find any reference in the docs.

Let's say ng serve --hmr, is HMR not enabled by default? Those are questions I ask myself and I think others that are starting with NG as well. To make that easier. We should add the default value behind every flag:

ng server --help
...
  --hmr
    Enable hot module replacement. (default: true)

At the moment my command looks like that:

ng serve --watch --live-reload --aot --hmr --open --progress --source-map

Because I'm not sure if any of them are true by default. Sure, I expect them to be true but I'm not sure. My previous projects were developed through Ionic CLI which had handled that ng serve under the hood.

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Describe alternatives you've considered

A note in the docs

@dgp1130
Copy link
Collaborator

dgp1130 commented Jun 10, 2021

Just to add a little more context, there are several different kinds of "defaults" in builders.

  • The default which is hard-coded in the builder itself.
  • The default specified in the user's configuration.
  • The default specified in the workspace.
  • The default specified in the project.

So including the text (default: true) is a bit of an oversimplification, and users might be surprised to find that the flag is actually false due to some project configuration.

I definitely agree that we should be more transparent about this, but whatever solution we come up with here needs to take all these different configurations into account.

@muuvmuuv
Copy link
Author

Over a year old and I am still opening JSON schema files to find default values. Just saying. Even with the latest "prod by default" I am not certain. Would really help. Maybe we can extend this and integrate into Editors for example in VS Code showing the default value as an annotation like Gitlens shows the edit history next to a line. Would love this. VS Code btw has this issue as well, where when I am overriding values with its default value ^^, IDK.

@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Feb 2, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 2, 2022

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

@ngbot ngbot bot modified the milestones: Backlog, needsTriage Feb 2, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 21, 2022

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

@angular-robot angular-robot bot added feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors and removed feature: votes required Feature request which is currently still in the voting phase labels Feb 21, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/schematics feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Projects
None yet
4 participants