grafana / plugin-tools

Create Grafana plugins with ease.
https://grafana.com/developers/plugin-tools/
Apache License 2.0
57 stars 28 forks source link

Create-plugin: Refactor getTemplateData to be used in generate command and update commands #837

Closed Ukochka closed 4 months ago

Ukochka commented 5 months ago

What this PR does / why we need it: After removing Plop another way to getting template data was introduced and it is a duplication of getTemplate data we already had. We need to unify getting template data for all the commands: generate, migrate, update, provisioning

After refactoring: getTemplateData returns TemplateData object. It takes data from User prompt for generate command and from package.json for other commands

Which issue(s) this PR fixes: Fixes #82

Special notes for your reviewer:

I merged changes from this PR, which fixes https://github.com/grafana/plugin-tools/issues/758

📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @grafana/create-plugin@4.9.1-canary.837.e9165e7.0 npm install @grafana/plugin-e2e@1.2.1-canary.837.e9165e7.0 # or yarn add @grafana/create-plugin@4.9.1-canary.837.e9165e7.0 yarn add @grafana/plugin-e2e@1.2.1-canary.837.e9165e7.0 ```
github-actions[bot] commented 5 months ago

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged and will trigger a new patch release. NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

grafana-plugins-platform-bot[bot] commented 4 months ago

:rocket: PR was released in @grafana/create-plugin@4.9.2 :rocket: