diff --git a/contribute/developer-guide.md b/contribute/developer-guide.md index 120e8a0daa9..6ec8cf121b5 100644 --- a/contribute/developer-guide.md +++ b/contribute/developer-guide.md @@ -77,10 +77,37 @@ yarn start ``` This command will generate sass theme files, build all external plugins, then build the frontend assets. -Once `yarn start` has built the assets, it will continue to do so whenever any of the files change. This means you don't have to manually build the assets every time you change the code. +Once `yarn start` has built the assets, it will continue to do so whenever any of the core Grafana application files change. This means you don't have to manually build the assets every time you change the code. > Troubleshooting: if your first build works, but after pulling updates you see unexpected errors in the "Type-checking in progress..." stage, these can be caused by the [tsbuildinfo cache supporting incremental builds](https://www.typescriptlang.org/tsconfig#incremental). You can `rm tsconfig.tsbuildinfo` and re-try. +#### Plugins + +If you are looking to contribute to any of the plugins listed below (that are found within the `public/app/plugins` directory) they require running additional commands to watch and rebuild them. + +- azuremonitor +- cloud-monitoring +- grafana-postgresql-datasource +- grafana-pyroscope-datasource +- grafana-testdata-datasource +- jaegar +- mysql +- parca +- tempo +- zipkin + +To build and watch all these plugins you can run the following command. Note this can be quite resource intensive as it will start separate build processes for each plugin. + +``` +yarn plugin:build:dev +``` + +If, instead, you would like to build and watch a specific plugin you can run the following command. Make sure to substitute `` with the plugins name field found in its package.json. e.g. `@grafana-plugins/tempo`. + +``` +yarn workspace dev +``` + Next, we'll build & run the web server that will serve the frontend assets we just built. ### Backend