-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(schematics): Generate --help for every CLI function. #417
Conversation
f01ce09
to
0655f5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This help documentation is awesome! Thanks for adding this. Made a few quick comments (some spelling/grammar things, a couple of suggestions).
.alias('update', 'migrates') // TODO: Remove after 1.0 | ||
.command( | ||
'lint [files..]', | ||
'Line workspace or set of files', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be "Lint workspace or...:" instead of "Line"?
'-- files="<file,list>"', | ||
'Targets a comma delimited list of files' | ||
) | ||
.command('-- --uncommitted', 'Targets uncommited changes') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncommitted
spelling in description
.command( | ||
'<action> -- files="<file,list>"', | ||
'Targets a comma delimited list of files' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The files example wraps in my terminal (not sure if that is something you can adjust or not...)
Commands:
nx affected <action> -- <SHA1 SHA2> Targets within a range of SHAs
nx affected <action> -- Targets a comma delimited list of
files="<file,list>" files
nx affected <action> -- --uncommitted Targets uncommited changes
nx affected <action> -- --untracked Targets untracked changes
nx affected dep-graph Generate a graph showing links
between targets
.command( | ||
// TODO: delete this after 1.0 | ||
'update <check|skip>', | ||
'Migrate to the latest version of NX', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lower case x for Nx
format(args); | ||
} | ||
) | ||
.command( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to move away from using the migrate
terminology. So maybe update the terms in the descriptions in here to be update, updates
instead of migrate, migrations
.
.demandCommand() | ||
.demand('file') | ||
.demand('output') | ||
.choices('output', [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be some documentation for using this?
) | ||
.command( | ||
'workspace-schematic <name>', | ||
'Generate a schematic `ng g <name>`', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a bit more descriptive for this line?:
Generate a custom schematic that can be run via `ng g <name>`
1b2b920
to
3e7ba25
Compare
This PR introduces the yargs package as our CLI command handler. We build up commands using yargs to take advantage of its built in --help flag formatter.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This PR introduces the
yargs
package as our CLI command handler.We build up commands using
yargs
to take advantage of its builtin
--help
flag formatter.