-
Notifications
You must be signed in to change notification settings - Fork 12k
fix(@angular-devkit/schematics-cli): fix list-schematics
is not printing anything
#12237
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
Conversation
@@ -36,21 +44,26 @@ function usage(exitCode = 0): never { | |||
Options: | |||
--debug Debug mode. This is true by default if the collection is a relative | |||
path (in that case, turn off with --debug=false). | |||
|
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 console is quite cluttered without break lines
…nting anything Usage: ``` $ schematics @schematics/angular: --list-schematics $ schematics --list-schematics ``` When no colon is specified, it means that that you are passing a schematic name to be looked up in the default collection. Closes #12220
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.
no tests?
@alexeagle I have added a couple of test as previously |
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.
cool!
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.
Sorry to barge in.
/** | ||
* Show usage of the CLI tool, and exit the process. | ||
*/ | ||
function usage(exitCode: 1 | 0 = 0): 1 | 0 { |
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.
Usage should probably be outside of main, which will bring this function under the size limit for the no-big-function lint rule.
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.
@hansl Updated as requested
Dismiss stale review is the wrong thing to do. It throws away an "approved with the following one change". |
--force Force overwriting files that would otherwise be an error. | ||
|
||
--list-schematics List all schematics from the collection, by name. A collection name | ||
should be suffixed by a colon. Example: '@schematics/schematics:'. |
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.
Thank you for this example with the colon! It's not something that would be expected, but this example should allow people to figure it out.
Thank you for jumping on this quickly! I'm planning to demonstrate a bit of this functionality for my schematics talk at AngularMix. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
fix
list-schematics
is not printing anythingUsage:
When no colon is specified, it means that that you are passing a schematic name to be looked up in the default collection.
Closes #12220