-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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: (gatsby-cli) Add a CLI command for listing plugins #28018
Conversation
integration-tests/gatsby-cli/gatsby-sites/gatsby-plugin/package.json
Outdated
Show resolved
Hide resolved
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'm not sure this plays nicely with local plugins (though maybe I'm the only one who uses those haha), but I've also had some trouble testing this reliably so I'd be happily disputed on that point.
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.
Let's do it. No clue why I didn't approve this earlier, sorry about that!
@@ -400,15 +401,21 @@ function buildLocalCommands(cli: yargs.Argv, isLocalSite: boolean): void { | |||
builder: yargs => | |||
yargs | |||
.positional(`cmd`, { | |||
choices: [`docs`], | |||
describe: "Valid commands include `docs`.", | |||
choices: [`docs`, `ls`], |
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.
Not needed now, but I wonder if we should add list
as an alias for ls
. Windows people might not know what ls
means
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.
Fair enough and easy to do. Let’s get this in and we can add it in the next pass.
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.
) * initial commit * initial gatsby list functionality * fix linter * use all, but pass a flag * add tests * Update integration-tests/gatsby-cli/gatsby-sites/gatsby-plugin/package.json * fix log destructure * use different not syntax * Refactor to move plugin commands out of gatsby package * linter * instead of showing the whole error let's show a more helpful message Co-authored-by: gatsbybot <[email protected]>
The command makes use of existing gatsby recipe provider functionality.
[ch17790]