Skip to content

Recognize ncc --version as ncc version and ncc --help as ncc help #1029

@mreis1

Description

@mreis1

Hello. First of all I want to tell you that NCC is awesome and for that reason I would like to make some suggestions may be useful to the community using ncc.

Flags such as --version, -v, --help, -h are widely used and these flags are the first that come to mind when trying to get one of those pieces of information.

In the other hand, ncc version and ncc help are not that intuitive at first glance.

So, it would be helpful to have those flags implemented or at least show the output of ncc help when a particular flag is not recognized instead of having ARG_UNKNOWN_OPTION.

C:\Users\<whoami>ncc --version
ArgError: unknown or unexpected option: --version
    at arg (C:\Users\<whoami\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:1774)
    at runCmd (C:\Users\<whoami\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:79049)
    at Object.819 (C:\Users\<whoami\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:77787)
    at __webpack_require__ (C:\Users\<whoami\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:8799
1)
    at C:\Users\<whoami\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:88203
    at C:\Users\<whoami\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc/cli.js.cache.js:1:88264
    at Object.<anonymous> (C:\Users\<whoami\AppData\Roaming\npm\node_modules\@vercel\ncc\dist\ncc\cli.js:8:28)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  code: 'ARG_UNKNOWN_OPTION'
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions