mirror of
https://github.com/grafana/grafana.git
synced 2024-11-21 16:38:03 -06:00
docs: update
This commit is contained in:
parent
86a2789541
commit
de25a4fe4e
8
.github/CONTRIBUTING.md
vendored
8
.github/CONTRIBUTING.md
vendored
@ -2,15 +2,11 @@ Follow the setup guide in README.md
|
||||
|
||||
### Rebuild frontend assets on source change
|
||||
```
|
||||
grunt && grunt watch
|
||||
yarn watch
|
||||
```
|
||||
|
||||
### Rerun tests on source change
|
||||
```
|
||||
npm run jest
|
||||
```
|
||||
or
|
||||
```
|
||||
yarn jest
|
||||
```
|
||||
|
||||
@ -21,6 +17,6 @@ test -z "$(gofmt -s -l . | grep -v -E 'vendor/(github.com|golang.org|gopkg.in)'
|
||||
|
||||
### Run tests for frontend assets before commit
|
||||
```
|
||||
npm test
|
||||
yarn test
|
||||
go test -v ./pkg/...
|
||||
```
|
||||
|
11
README.md
11
README.md
@ -43,7 +43,7 @@ To build the assets, rebuild on file change, and serve them by Grafana's webserv
|
||||
```bash
|
||||
npm install -g yarn
|
||||
yarn install --pure-lockfile
|
||||
yarn run watch
|
||||
yarn watch
|
||||
```
|
||||
|
||||
Build the assets, rebuild on file change with Hot Module Replacement (HMR), and serve them by webpack-dev-server (http://localhost:3333):
|
||||
@ -56,7 +56,7 @@ Note: HMR for Angular is not supported. If you edit files in the Angular part of
|
||||
|
||||
Run tests
|
||||
```bash
|
||||
yarn run jest
|
||||
yarn jest
|
||||
```
|
||||
|
||||
### Recompile backend on source change
|
||||
@ -93,14 +93,13 @@ In your custom.ini uncomment (remove the leading `;`) sign. And set `app_mode =
|
||||
#### Frontend
|
||||
Execute all frontend tests
|
||||
```bash
|
||||
yarn run test
|
||||
yarn test
|
||||
```
|
||||
|
||||
Writing & watching frontend tests
|
||||
|
||||
- jest for all new tests that do not require browser context (React+more)
|
||||
- Start watcher: `yarn run jest`
|
||||
- Jest will run all test files that end with the name ".test.ts"
|
||||
- Start watcher: `yarn jest`
|
||||
- Jest will run all test files that end with the name ".test.ts"
|
||||
|
||||
#### Backend
|
||||
```bash
|
||||
|
@ -57,7 +57,7 @@ For this you need nodejs (v.6+).
|
||||
```bash
|
||||
npm install -g yarn
|
||||
yarn install --pure-lockfile
|
||||
npm run watch
|
||||
yarn watch
|
||||
```
|
||||
|
||||
## Running Grafana Locally
|
||||
@ -83,18 +83,17 @@ go get github.com/Unknwon/bra
|
||||
bra run
|
||||
```
|
||||
|
||||
You'll also need to run `npm run watch` to watch for changes to the front-end (typescript, html, sass)
|
||||
You'll also need to run `yarn watch` to watch for changes to the front-end (typescript, html, sass)
|
||||
|
||||
### Running tests
|
||||
|
||||
- You can run backend Golang tests using "go test ./pkg/...".
|
||||
- Execute all frontend tests with "npm run test"
|
||||
- You can run backend Golang tests using `go test ./pkg/...`.
|
||||
- Execute all frontend tests with `yarn test`
|
||||
|
||||
Writing & watching frontend tests
|
||||
|
||||
- jest for all new tests that do not require browser context (React+more)
|
||||
- Start watcher: `npm run jest`
|
||||
- Jest will run all test files that end with the name ".test.ts"
|
||||
- Start watcher: `yarn jest`
|
||||
- Jest will run all test files that end with the name ".test.ts"
|
||||
|
||||
|
||||
## Creating optimized release packages
|
||||
|
Loading…
Reference in New Issue
Block a user