-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
@grafana/toolkit - implement common tooling for plugin developers #17819
Comments
@ryantxu could you please update |
rollup vs webpack? so I originally though rollup was a good path because it makes nicer bundles... but having tried this with a bunch of plugins, I think it is going to be more difficult that in is worth :( rollup seems to be much stricter about how it imports and packages libraries. This is likely more "correct", but I am struggling to find something that works. I think we should consider webpack. @dprokop, could you take a stab a matching this webpack.config.js -- If you get close, I can poke on the details till it works with a few of the plugins |
@ryantxu sure, as we talked on friday, we gonna try with webpack here. |
Current Status: ✅ https://github.com/ryantxu/ajax-panel I think the next priorities should be:
|
This fixes error caused by ng-annotate mentioned in #17819 (comment)
Currently the toolkit doesn't watch .html files, which are common in plugins for the query editors/datasource configuration. It would be great to have 'yarn dev --watch' detect changes to these files and drop them into dist, just like the rest of the process. The "hack" i've used so far is to add htmlwebpackplugin, though it leaves an artifact 'index.html' that never gets used, but does detect and copy the partials/* correctly. |
Anything left for this issue? Maybe close this and create an issue for remaining issues |
@torkelo yup, closing this one. Other toolkit tasks are tracked in separate issues. |
The work started in: #17445
TODO:
- OK for plugins in grafana repo to skip the org
Areas to cover
Plugin development tasks
grafana-toolkit plugin:test
- performs tests for a given plugingrafana-toolkit plugin:dev
- runs plugin in development mode, meaning that Rollup is run inwatch
modegrafana-toolkit plugin:build
- prepares plugin distribution packagegrafana-toolkit plugin:create
- creates plugin seed from a template (grafana/toolkit: Introduce scaffolding task #18506)Testing plugin
Linting / Prettier
tslint
plugin:dev
(grafana/toolkit: prettier and lint fix in dev mode #18131)Bundling plugin
plugin:dev
andplugin:build
) (grafana/toolkit: show webpack stats on successful compilation #18138)### Documentationgenerate docs from/docs
foldera different task should do this
CircleCI helpers
package a plugin in circleci. this will be super helpful for backend plugins.
See: #17967
Plugin stylesheet (#17938)
With new react panels, we should push for emotion. However we still need to support old/existing panels that tend to either just import a .css file, or use: loadPluginCss
v2 backlog:
plugin:ci
- gather stats from webpack taskCurrent (known) problems to be figured out
import XXX from 'app/plugins/sdk'
This problem surfaced in k8s and ajax panel. Can't see any clear path how to fight this one. Problem is that those plugins import implementations from core (indirectyl, via pligins/sdk). It's not about interfaces anymore but about actual implementations being extended by apps/plugins. Thing is that we possibly could extract app/plugins/sdk to a separate package, i.e.
@grafana/plugin-sdk
, but it's super hard because of app/plugins/sdk referencing core modules.... CrapToolkit wishlist:
https://github.com/grafana/grafana-polystat-panel/blob/use-toolkit/src/d3wrapper.ts#L1
The text was updated successfully, but these errors were encountered: