Skip to content

Commit

Permalink
Docs: Update development docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanahuckova committed Jun 19, 2024
1 parent 44d0b7f commit 5dab8cb
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,46 @@ Visualize your Google Spreadsheets with Grafana

Check the [docs](https://github.com/grafana/google-sheets-datasource/blob/main/src/README.md) for information on how to use the data source.

## Development
## Development guide

This is a basic guide on how to set up your local environment, make the desired changes and see the result with a fresh Grafana installation.

## Requirements

You need to install the following first:

- [Mage](https://magefile.org/)
- [Yarn](https://yarnpkg.com/)
- [Docker Compose](https://docs.docker.com/compose/)

### Building the Plug-In
## Running the development version

In order to build the plug-in, both front-end and back-end parts, do the following:
### Compiling the Backend

```
yarn install
yarn build
```
If you have made any changes to any `go` files, you can use [mage](https://github.com/magefile/mage) to recompile the plugin.

The built plug-in will be in the dist/ directory.
```sh
mage build:linux && mage reloadPlugin
```

### Testing the Plug-In w/ Docker Compose
### Compiling the Frontend

To test the plug-in running inside Grafana, we recommend using our Docker Compose setup:
After you made the desired changes, you can build and test the new version of the plugin using `yarn`:

```BASH
mage buildAll
```sh
yarn run dev # builds and puts the output at ./dist
```

In another terminal
The built plug-in will be in the `dist/` directory.

### Docker Compose

```BASH
To test the plug-in running inside Grafana, we recommend using our Docker Compose setup:

```sh
docker-compose up
```

To restart the plug-in after backend changes:
`./scripts/restart-plugin.sh`

### Test spreadsheet

Need at publicly available spreadsheet to play around with? Feel free to use [this](https://docs.google.com/spreadsheets/d/1TZlZX67Y0s4CvRro_3pCYqRCKuXer81oFp_xcsjPpe8/edit?usp=sharing) demo spreadsheet that is suitable for visualization in graphs and in tables.

0 comments on commit 5dab8cb

Please sign in to comment.