Skip to content

--help output showing subcommands with -- prefix #413

Description

@rossipedia

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Webpack's --help flag shows the following options:

Initialization:
  --init             Initializes a new webpack configuration or loads a
                     addon if specified                                [boolean]
  --migrate          Migrate your webpack configuration from webpack 1 to
                     webpack 2                                         [boolean]
  --add              Adds a webpack component to your configuration file
                                                                       [boolean]
  --generate-loader  Generates a new webpack loader project            [boolean]
  --generate-plugin  Generates a new webpack plugin project            [boolean]

The bug is that they're prefixed with --, which is not how they're intended to be invoked:

$ webpack --init
...
ERROR in Entry module not found: Error: Can't resolve './src' in '/home/bryan/scratch'

$ webpack init
i INFO For more information and a detailed description of each question, have a look at https://github.com/webpack/webpack-cli/blob/master/INIT.md
i INFO Alternatively, run `webpack(-cli) --help` for usage info.

? Will your application have multiple bundles? (Y/n)

If the current behavior is a bug, please provide the steps to reproduce.

See previous

What is the expected behavior?

Help output should show sub-commands without the -- prefix.

If this is a feature request, what is motivation or use case for changing the behavior?

Please paste the results of webpack-cli info here, and mention other relevant information such as programming language.

λ webpack-cli  info

  System:
    OS: Windows 10
    CPU: x64 Intel(R) Core(TM) i7-3970X CPU @ 3.50GHz
  Binaries:
    Node: 9.11.1
    Yarn: 1.6.0
    npm: 5.6.0
  Browsers: {}
  npmPackages:
    webpack:
      wanted: ^4.6.0
      installed: 4.6.0
    webpack-cli:
      wanted: ^2.0.15
      installed: 2.0.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions