Skip to content

Negated flags #1240

Closed
Closed

Description

@ematipico

Is your feature request related to a problem? Please describe.
The CLI should support negated flags.

Describe the solution you'd like
The CLI should support same negated flags

  • --no-hot
  • --no-colors
  • --no-mode

Activity

  1. snitin315 commented on Feb 23, 2020

    @snitin315
    Contributor

    @ematipico I would like to work on this issue. It would be great if you can point me to some reference or share any tip/prerequisite .

  2. rishabh3112 commented on Feb 23, 2020

    @rishabh3112
    Contributor

    Thanks for trying to work on the issue.
    You can look at how other flags are added in the CLI, that would be enough to get you working on the issue.
    You can ask for more help here if you need in future 🙌

  3. snitin315 commented on Feb 23, 2020

    @snitin315
    Contributor

    @rishabh3112 thanks , Looking into it.

  4. snitin315 commented on Feb 26, 2020

    @snitin315
    Contributor

    @rishabh3112 correct me if I'm wrong the --no-mode flag should set mode = "none" .?

  5. ematipico commented on Feb 26, 2020

    @ematipico
    ContributorAuthor

    It depends on us. What do you think?

  6. snitin315 commented on Feb 26, 2020

    @snitin315
    Contributor

    I think it should set mode = "none"

  7. ematipico commented on Feb 26, 2020

    @ematipico
    ContributorAuthor

    Sounds good :)

  8. snitin315 commented on Feb 27, 2020

    @snitin315
    Contributor

    @ematipico @rishabh3112 , I am able to add nomode or no_mode but I can't pass no-mode in the code below in zero-config.js like this -

    function getEnvFromOptionsAndMode(mode, optionsObject) {
         const { dev, prod, no-mode } = optionsObject;
    
    

    Whats the trick here to do so?

  9. anshumanv commented on Feb 27, 2020

    @anshumanv
    Contributor

    - would be seen as an operator while destructuring since what you're destructuring is not a valid key, syntactically wrong.

    Maybe add an alias variable for the flag like --no-mode stores a property is stored with key no_mode?

  10. snitin315 commented on Feb 27, 2020

    @snitin315
    Contributor

    I think I should make a PR and move the discussion over there.

  11. ematipico commented on Feb 27, 2020

    @ematipico
    ContributorAuthor

    As the file says, that's a file we use for covering the case the user doesn't use any configuration.

    The reading and parsing of the new flag will occur inside the group you decide to put.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions