Skip to content

Show default values for each command flag聽#17191

Closed

Description

@muuvmuuv

馃殌 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

Activity

  1. modified the milestone: Backlog on Mar 11, 2020
  2. removed
    help wantedLabel noting an issue which the team is looking for contribution from the community to fix
    on Jun 12, 2020
  3. dgp1130 commented on Jun 10, 2021

    @dgp1130
    Collaborator

    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.

  4. muuvmuuv commented on Jun 10, 2021

    @muuvmuuv
    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.

  5. angular-robot commented on Feb 2, 2022

    @angular-robot
    Contributor

    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.

  6. modified the milestones: Backlog, needsTriage on Feb 2, 2022
  7. angular-robot commented on Feb 21, 2022

    @angular-robot
    Contributor

    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.

  8. added
    feature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authors
    and removed
    feature: votes requiredFeature request which is currently still in the voting phase
    on Feb 21, 2022
  9. angular-automatic-lock-bot commented on Apr 9, 2022

    @angular-automatic-lock-bot

    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.

  10. locked and limited conversation to collaborators on Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @angular-devkit/schematicsfeatureLabel used to distinguish feature request from other issuesfeature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authors

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions