You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: web/README.md
+5-19Lines changed: 5 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,12 @@ Testgrid frontend code uses Lit elements and is written in Typescript. `tsconfig
6
6
More info about Lit and Typescript can be found in [Lit docs](https://lit.dev/) and [TS docs](https://www.typescriptlang.org/) respectively.
7
7
8
8
## Development
9
-
Local development is done with the help of [Web Dev Server](https://modern-web.dev/docs/dev-server/overview/). Web dev server configurations are defined in `web-dev-server-{env}.config.mjs` file. Depending on the config, frontend will render from the data from either fake or prod API.
9
+
Local development is done with the help of [Web Dev Server](https://modern-web.dev/docs/dev-server/overview/). Web dev server configurations are defined in `web-dev-server-{env}.config.mjs` file. Depending on the config, frontend will render from the data from either fake or prod API.
10
10
11
-
To develop locally:
12
-
- Run `npm install`, then:
13
-
- To see fake data, run `npm run start:local`
14
-
- To see prod data, run `npm run start:k8s`
15
-
16
-
More info in the [Scripts](#scripts) section below.
17
-
18
-
TIP: If you hit unexpected errors, try running `rm -rf node_modules/`, then `npm install` to refresh dependencies.
11
+
To see fake data, run `npm run start:local`. To see prod data, run `npm run start:k8s`. More info in the [Scripts](#scripts) section below.
19
12
20
13
## Testing
14
+
Testing relies on [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) with the configuration defined in `web-test-runner.config.mjs`. Testing is currently happening across the fake data provided by `json-server`.
21
15
22
16
To run the tests, run `npm run test`. More info in the [Scripts](#scripts) section below.
23
17
@@ -34,15 +28,7 @@ Most scripts are in `npm run` commands.
34
28
35
29
## Pulling from upstream
36
30
37
-
To generate or update the proto definitions:
38
-
39
-
- Checkout a local copy of https://github.com/GoogleCloudPlatform/testgrid, ex. `gh repo clone GoogleCloudPlatform/testgrid $HOME/gcp-testgrid`
40
-
- Run
41
-
```
42
-
# Path to local GCP/testgrid repo, `$HOME/gcp-testgrid`
43
-
TGREPO={{local GCP/testgrid repo}}
44
-
bump-protos.sh "$TGREPO"
45
-
```
31
+
Upstream proto definitions can be generated by running `pb/bump-protos.sh`
46
32
47
33
## Configs and files
48
34
- Frontend code is located in `src` dir.
@@ -52,4 +38,4 @@ To generate or update the proto definitions:
52
38
-`tsconfig.json` defines how and where will the .ts files compile.
53
39
-`web-dev-server-*.config.mjs` defines configuration parameters for the web dev server.
54
40
-`web-test-runner.config.mjs` defined configuration parameters for the web test runner.
55
-
-`rollup.config.js` defines how the code will be built and bundled.
41
+
-`rollup.config.js` defines how the code will be built and bundled.
0 commit comments