-
Notifications
You must be signed in to change notification settings - Fork 32
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
Create Plugin: Improve cli args and add docs #1030
Conversation
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.
Nice! No blockers from me other than the bit about gh workflows being added in. Would be good to have a style review from @josmperez
… passed by cli arg
…is passed via cli
…ed together via cli
a7befb1
to
f3736ae
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.
Some suggestions, but overall LGTM.
docusaurus/docs/reference/prompts.md
Outdated
@@ -13,7 +13,7 @@ sidebar_position: 40 | |||
|
|||
# Prompts | |||
|
|||
When running the `create-plugin` command, the following prompts appear: | |||
When running the `create-plugin` command, the following prompts will appear. |
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.
preferred style is present indicative tense
@@ -118,7 +118,8 @@ export function getTemplateData(cliArgs?: GenerateCliArgs): TemplateData { | |||
...EXTRA_TEMPLATE_VARIABLES, | |||
pluginId: normalizeId(cliArgs.pluginName, cliArgs.orgName, cliArgs.pluginType), | |||
pluginName: cliArgs.pluginName, | |||
hasBackend: cliArgs.hasBackend, | |||
// check plugintype and hasBackend as they can both be passed via user input (cli args). |
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.
// check plugintype and hasBackend as they can both be passed via user input (cli args). | |
// check plugintype and hasBackend as they can both be passed through user input (CLI args). |
Co-authored-by: Joseph Perez <45749060+josmperez@users.noreply.github.com>
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.
Nice 🚀
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 necessarily for this PR, but I think it would make sense to change to title from "Prompts" to something like "CLI prompts" (or similar) to make it more clear when navigating in the side menu.
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.
Nice! Tested and it works as expected.
Nit and up to you: Now that we use kebab case in the docs, you may want to use this casing also in our npm scripts.
🚀 PR was released in |
What this PR does / why we need it:
With the release of create-plugin@5.0.0 we simplified the prompts. This PR enhances the cli args by:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
npm install @grafana/create-plugin@5.1.0-canary.1030.d9383c4.0 # or yarn add @grafana/create-plugin@5.1.0-canary.1030.d9383c4.0