-
Notifications
You must be signed in to change notification settings - Fork 34
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
Migrate to create-plugin tool #499
Conversation
@andresmgot thanks for the ping. I've gone ahead and opened a bug report in https://github.com/grafana/plugin-tools to fix some of the issues reported here. |
Hi @andresmgot regarding error 3 the configuration that comes with create-plugin doesn't allow for implicity any. You can change this by modifying your
Jack is looking into the CSS issue and I'll see for error 2. |
I created a but report for the second issue grafana/plugin-tools#101 |
Have opened PRs to address issues 1 and 2. |
Thanks for the quick response and fixes! Another thing that we need to adapt is drone: https://drone.grafana.net/grafana/azure-data-explorer-datasource/595/1/5 it expects plugins to have |
Levitate is-compatible report: 🔍 Resolving @grafana/data@latest... 🔬 Checking compatibility between ./src/module.ts and @grafana/data@9.2.3... 🔬 Checking compatibility between ./src/module.ts and @grafana/ui@9.2.3... 🔬 Checking compatibility between ./src/module.ts and @grafana/runtime@9.2.3... 🔬 Checking compatibility between ./src/module.ts and @grafana/e2e-selectors@9.2.3... ✔️ ./src/module.ts appears to be compatible with @grafana/data,@grafana/ui,@grafana/runtime,@grafana/e2e-selectors |
594d7a7
to
9dada88
Compare
9dada88
to
31cd091
Compare
Backend code coverage report for PR #499 |
Frontend code coverage report for PR #499
|
b682497
to
83ad481
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.
Nice work! Only question from me is if it'd be worth updating CONTRIBUTING.md
to provide some more info on how to develop this plugin using the new toolkit. I don't think it's necessary but could be nice to have.
not much is different (basically you don't need to interact with the new tool, it's just for bootstraping the plugin) |
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.
Forgot to approve this 🙈
Looks good!
The goal of this PR is migrate the plugin to use the tool @grafana/create-plugin.
Note that now the command
yarn watch
has been replaced withyarn dev
.All the changes here are the result of executing the migration steps except the following:
tsconfig
configuration has been adapted to the pluginDraft notes
rootdir
andCSS
filesFrom there, now
webpack
is crashing hard with different kind of errors I am having trouble to fix:SOLVED
1. Failed to import a css file. This is the same error I found with jest:SOLVED
2. Failed to import files with a path relative to the rootdir. Again, I fixed this in jest but I am not sure how to fix it for webpack:SOLVED
3. Multiple typescript errors. Not sure if we should fix them or modify the TS config to allow them:You can reproduce the errors above with
yarn build
oryarn dev
.I am not an webpack expert so can we get some guidance here @jackw @academo? Thanks!
Fixes #489