Skip to content
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

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

Closed
mreis1 opened this issue Jan 18, 2023 · 3 comments · Fixed by #1030
Closed

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

mreis1 opened this issue Jan 18, 2023 · 3 comments · Fixed by #1030
Labels
enhancement New feature or request good first issue Good for newcomers released

Comments

@mreis1
Copy link
Contributor

mreis1 commented Jan 18, 2023

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'
}
@styfle styfle added enhancement New feature or request good first issue Good for newcomers labels Jan 18, 2023
@styfle
Copy link
Member

styfle commented Jan 18, 2023

Sounds like a good idea, PRs welcome!

@mreis1
Copy link
Contributor Author

mreis1 commented Jan 19, 2023

PR sent.

@github-actions
Copy link

🎉 This issue has been resolved in version 0.36.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants