-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[DOCS] Synopsis sections are not auto generated. #4189
Comments
npm create
command is not documented in npm documentation npm create
command is not documented
npm create
command is not documented
The |
this feeels like less of a synopsis issue and more of a "there's no documentation for |
They're aliases. |
that's true, but the docs site has no reference (about it being an alias) to |
You'll notice that synopsis does not match the output of https://github.com/npm/cli/blob/latest/docs/content/commands/npm-init.md?plain=1#L7-L14 Notice how the configuration section has notes about it being auto generated https://github.com/npm/cli/blob/latest/docs/content/commands/npm-init.md?plain=1#L146
|
Oh! I see. I think I get it. I will work on this and send a fix. |
@wraithgar are you ok with me updating all I'd like to validate this change before going over all 66 files. Here is a preview of the change I need to make to each commands files: |
@manekinekko I don't think you need to edit the js files. It's supposed to work the other way around. The content in the .md files is out of date and the Aliases for any given cmd name can be done like this > require('./lib/utils/usage.js')('init', '').trim()
'aliases: create, innit' Usage like this require('./lib/commands/init.js').usage.map(u => `npm init ${u}`).join('\n')
'npm init [--force|-f|--yes|-y|--scope]\n' +
'npm init <@scope> (same as `npx <@scope>/create`)\n' +
'npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)' The "command options" are already being powered by the |
See here how the "run without positional args" part of the old synopsis is already duplicated elsewhere in the description of |
Fantastic! Thanks for pointing this out. I will take care of this then :) |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I found that
npm create <initializer>
behaves the same way asnpm init <initializer>
, but there seems to be no mention of it in the documentationExpected Behavior
To have Documentation
Steps To Reproduce
npm create vue
create-vue
Environment
The text was updated successfully, but these errors were encountered: