From 2aaaa98eee1c46b1ad700e0e8cd0d9ed6a46a2dd Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Wed, 25 Sep 2019 16:23:59 +0200 Subject: [PATCH] grafana/toolkit: Improve contribution readme (#19400) * Improve toolkit's readme about contributing * Update packages/grafana-toolkit/README.md Co-Authored-By: kay delaney <45561153+kaydelaney@users.noreply.github.com> --- packages/grafana-toolkit/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/grafana-toolkit/README.md b/packages/grafana-toolkit/README.md index 21085954190..7f61b78325d 100644 --- a/packages/grafana-toolkit/README.md +++ b/packages/grafana-toolkit/README.md @@ -222,11 +222,16 @@ module.exports = { ## Contributing to grafana-toolkit +### Development Typically plugins should be developed using the `@grafana/toolkit` installed from npm. However, when working on the toolkit, you may want to use the local version. To do that follow the steps below: 1. Clone [Grafana repository](https://github.com/grafana/grafana) 2. Navigate to the directory you have cloned Grafana repo to and run `yarn install --pure-lockfile` 3. Navigate to `/packages/grafana-toolkit` and run `yarn link` -2. Navigate to your plugin directory and run `npx grafana-toolkit plugin:dev --yarnlink`. This will add all dependencies required by grafana-toolkit to your project as well as link your local grafana-toolkit version to be used by the plugin. +2. Navigate to the directory where your plugin code is and run `npx grafana-toolkit plugin:dev --yarnlink`. This will add all dependencies required by grafana-toolkit to your project as well as link your local grafana-toolkit version to be used by the plugin. +### Debugging +To debug grafana-toolkit you can use standard [NodeJS debugging methods](https://nodejs.org/de/docs/guides/debugging-getting-started/#enable-inspector) (`node --inspect`, `node --inspect-brk`). To run grafana-toolkit in a debugging session use the following command in the toolkit's directory: + +`node --inspect-brk ./bin/grafana-toolkit.js [task]`