-
Notifications
You must be signed in to change notification settings - Fork 12.6k
WIP: Add @grafana/toolkit package #17445
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
Conversation
It feels a bit strange to move the big project tasks (theme watching, changelog, cherrypick) to this toolkit package that I thought would be more focused on building & testing plugins. But maybe mixing these is fine? |
@ryantxu @torkelo see 4caadbf for first attempt for having shared tsconfig for plugins. I assume that there will be cases when extending tsconfig will be necessary. According to microsoft/TypeScript#29172 some paths are resolved relatively to tsconfig.json location. For example, if I extend the base config from grafana/toolkit (btw got it working only with such extend: Another issue is that in order for the IDE to pickup grafana/toolkit tsconfig we need to extend it in the local tsconfig. Couldn't make it work with FYI for testing purposes use |
@torkelo @ryantxu see https://github.com/grafana/rss-panel/pull/1 for grafana-toolkit usage reference. Especially interesting is tsconfig.json. Apparently, all path specific options need to be defined in that file for I don't like how the default config is extended though, as it requires either path to node modules (as in the example PR https://github.com/grafana/rss-panel/pull/1/files#diff-e5e546dd2eb0351f813d63d1b39dbc48), or we could also introduce package with default tsconfig for plugin. I don't like this idea though. But to be honest I think that with any of the approaches we take there will be possibility to override defaults, so maybe we should basically provide a basic tsconfig.json file when we will introduce some plugin boilerplate? |
I think we should merge this soon even if the plugin build stuff still needs work. |
@dprokop -- I'm trying to make this work with old plugins like: I added the option to use the local tslint.json if it exists, this way plugins could migrate slowly if necessary. I also added the |
Introduces @grafana/toolkit package and migrates cli tools there.
TODO:
- OK for plugins in grafana repo to skip the org
Currently trying with:
app/plugin/sdk
app/plugin/sdk