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: CONTRIBUTING.md
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,79 @@ All the tools used for development are free and open-source, so you can install
83
83
84
84
The version numbers of tools used in GitHub workflows are defined as [repository variables](https://github.com/grafana/xk6-dashboard/settings/variables/actions). The version numbers of tools used in the *Development Containers* are only defined in the `.devcontainer/devcontainer.json` file. The version numbers should be updated carefully to be consistent.
85
85
86
+
## Frontend Development
87
+
88
+
If you want to work on the frontend components without using devcontainers, you can run the frontend development servers directly. The project uses [Lerna](https://lerna.js.org/) to manage multiple packages in the `dashboard/assets` directory.
89
+
90
+
### Prerequisites
91
+
92
+
-[Node.js](https://nodejs.org/) (version 18 or higher)
93
+
-[Yarn](https://yarnpkg.com/) package manager
94
+
-[Go](https://golang.org/) (for backend server)
95
+
96
+
### Running the Frontend
97
+
98
+
1.**Install dependencies** (only needed once):
99
+
```bash
100
+
cd dashboard/assets
101
+
yarn install
102
+
```
103
+
104
+
2.**Start the development servers**:
105
+
106
+
**Option 1: Use Lerna to run dev scripts across all packages**
107
+
```bash
108
+
# From the dashboard/assets directory
109
+
npx lerna run dev --parallel
110
+
```
111
+
112
+
This will start development servers for all packages that have a `dev` script (UI, Report, Model, and View packages).
113
+
114
+
**Option 2: Run individual packages**
115
+
```bash
116
+
# Start the UI development server (typically on http://localhost:5173)
117
+
cd packages/ui
118
+
yarn dev
119
+
120
+
# In another terminal, start the Report development server (typically on http://localhost:5174)
121
+
cd packages/report
122
+
yarn dev
123
+
```
124
+
125
+
### Running the Backend Server
126
+
127
+
To test the frontend with real data, you can run the backend server using the provided sample dataset:
128
+
129
+
**Option 1: Build and run the CLI tool**:
130
+
```bash
131
+
# Build k6-web-dashboard
132
+
go build -o k6-web-dashboard ./cmd/k6-web-dashboard
The usual contributor tasks can be performed using GNU make. The `Makefile` defines a target for each task. To execute a task, the name of the task must be specified as an argument to the make command.
0 commit comments