Docs: minor fixes to developer docs (#49790)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
This guide helps you get started developing Grafana.
|
||||
|
||||
Before you begin, you might want to read [How to contribute to Grafana as a junior dev](https://medium.com/@ivanahuckova/how-to-contribute-to-grafana-as-junior-dev-c01fe3064502) by [Ivana Huckova](https://medium.com/@ivanahuckova).
|
||||
|
||||
## Dependencies
|
||||
|
||||
Make sure you have the following dependencies installed before setting up your developer environment:
|
||||
@@ -59,6 +57,8 @@ Before we can build the frontend assets, we need to install the dependencies:
|
||||
yarn install --immutable
|
||||
```
|
||||
|
||||
> Troubleshooting: if you get the error `The remote archive doesn't match the expected checksum` for a dependency pulled from a link (e.g. `"tether-drop": "https://github.com/torkelo/drop"`): this is a temporary mismatch. To work around it (while someone corrects the issue), you can prefix your `yarn install --immutable` command with [`YARN_CHECKSUM_BEHAVIOR=update`](https://yarnpkg.com/advanced/error-codes#yn0018---cache_checksum_mismatch)
|
||||
|
||||
After the command has finished, we can start building our source code:
|
||||
|
||||
```
|
||||
@@ -67,7 +67,9 @@ yarn start
|
||||
|
||||
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.
|
||||
|
||||
Next, we'll build the web server that will serve the frontend assets we just built.
|
||||
> 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.
|
||||
|
||||
Next, we'll build & run the web server that will serve the frontend assets we just built.
|
||||
|
||||
### Backend
|
||||
|
||||
@@ -95,7 +97,7 @@ You can build the back-end as follows:
|
||||
2. Generate code using Wire:
|
||||
|
||||
```
|
||||
# Normally Wire tool installed at $GOPATH/bin/wire.exe
|
||||
# Default Wire tool install path: $GOPATH/bin/wire.exe
|
||||
<Wire tool install path> gen -tags oss ./pkg/server ./pkg/cmd/grafana-cli/runner
|
||||
```
|
||||
|
||||
@@ -166,19 +168,19 @@ To run the tests:
|
||||
yarn e2e
|
||||
```
|
||||
|
||||
By default, the end-to-end tests starts a Grafana instance listening on `localhost:3001`. To use a specific URL, set the `BASE_URL` environment variable:
|
||||
By default, the end-to-end tests start a Grafana instance listening on `localhost:3001`. To use a different URL, set the `BASE_URL` environment variable:
|
||||
|
||||
```
|
||||
BASE_URL=http://localhost:3333 yarn e2e
|
||||
```
|
||||
|
||||
To follow the tests in the browser while they're running, use the `yarn e2e:debug`.
|
||||
To follow all tests in the browser while they're running, use `yarn e2e:debug`
|
||||
|
||||
```
|
||||
yarn e2e:debug
|
||||
```
|
||||
|
||||
If you want to pick a test first, use the `yarn e2e:dev`, to pick a test and follow the test in the browser while it runs.
|
||||
To choose a single test to follow in the browser as it runs, use `yarn e2e:dev`
|
||||
|
||||
```
|
||||
yarn e2e:dev
|
||||
@@ -198,7 +200,7 @@ app_mode = development
|
||||
|
||||
### Add data sources
|
||||
|
||||
By now, you should be able to build and test a change you've made to the Grafana source code. In most cases, you need to add at least one data source to verify the change.
|
||||
By now, you should be able to build and test a change you've made to the Grafana source code. In most cases, you'll need to add at least one data source to verify the change.
|
||||
|
||||
To set up data sources for your development environment, go to the [devenv](/devenv) directory in the Grafana repository:
|
||||
|
||||
@@ -287,5 +289,4 @@ If that happens to you, chances are you've already set a lower limit and your sh
|
||||
|
||||
- Read our [style guides](/contribute/style-guides).
|
||||
- Learn how to [Create a pull request](/contribute/create-pull-request.md).
|
||||
- Read [How to contribute to Grafana as a junior dev](https://medium.com/@ivanahuckova/how-to-contribute-to-grafana-as-junior-dev-c01fe3064502) by [Ivana Huckova](https://medium.com/@ivanahuckova).
|
||||
- Read about the [architecture](architecture).
|
||||
|
||||
Reference in New Issue
Block a user