Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 2.02 KB

devDocs.md

File metadata and controls

47 lines (32 loc) · 2.02 KB

Developer documentation

Pre-requisites for plugin development

For Back-end

  • Install Go
  • Install Mage
  • Install Go extension in VS code (optional)

For Front-end

  • Install node
  • Install yarn (npm install --global yarn)

Setting up the development environment

Frontend

  1. Install dependencies with yarn install

  2. Build plugin in development mode or run in watch mode with yarn dev or yarn watch

  3. Build plugin in production mode with yarn build

Backend

  1. Update Grafana plugin SDK for Go dependency to the latest minor version:

    go get -u github.com/grafana/grafana-plugin-sdk-go
    go mod tidy
  2. Build backend plugin binaries for Linux, Windows and Darwin with mage -v or mage -v build:windows for building only for windows

  3. List all available Mage targets for additional commands using mage -l

  4. Test for backend datasource located at plugin_test.go. Test can be run easily in vs code with GO VS code extension installed

References