The easiest way to get started is to git clone the project repository
directly into the data/plugins
of your Grafana instance followed
by building it there.
Grafana will read in the dist
folder first. So, to see your changes in
Grafana, you will have to build the plugin once. However, you do not
need to restart your local Grafana server after every change, just
refreshing the page will be sufficient.
- Display all tasks from
grafana-toolkit
:npx grafana-toolkit --help
- Install packages:
npx yarn install
- Bundle plugin in dev mode:
npx yarn dev
- Bundle plugin in dev mode and start a watcher:
npx yarn watch
- Run the tests before submitting a PR:
npx yarn test
- Run specific tests:
npx yarn test --testNamePattern "when some fields"
- Install packages:
npx yarn install
- Build into
dist/
, lint and run tests:npx yarn build
- Build plugin on CI:
npx grafana-toolkit plugin:ci-build
- Create a zip package:
npx grafana-toolkit plugin:ci-package
When this process succeeds, packages can be found within theci/packages/
folder.