Skip to content

Commit b0495db

Browse files
committed
Update reference to replace make commands by npm
Signed-off-by: Joaquim Rocha <joaquim.rocha@microsoft.com>
1 parent 72f589b commit b0495db

File tree

10 files changed

+93
-57
lines changed

10 files changed

+93
-57
lines changed

.github/workflows/app.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
go-version: '1.24.*'
4141
- name: Run tests
42-
run: npm run app:test
42+
run: npm run app:test:unit
4343
- name: Run tsc type checker
4444
run: npm run app:tsc
4545
- name: App linux
@@ -60,7 +60,7 @@ jobs:
6060
with:
6161
go-version: '1.24.*'
6262
- name: Run tests
63-
run: npm run app:test
63+
run: npm run app:test:unit
6464
- name: Run tsc type checker
6565
run: npm run app:tsc
6666
- name: App Windows
@@ -79,8 +79,12 @@ jobs:
7979
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
8080
with:
8181
go-version: '1.24.*'
82+
- name: Install Python and build tools
83+
run: |
84+
brew install python@3.11
85+
npm install -g node-gyp
8286
- name: Run tests
83-
run: npm run app:test
87+
run: npm run app:test:unit
8488
- name: Run tsc type checker
8589
run: npm run app:tsc
8690
- name: App Mac

.github/workflows/frontend.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ jobs:
130130
with:
131131
node-version: ${{ matrix.node-version }}
132132
cache: "npm"
133-
cache-dependency-path: frontend/package-lock.json
133+
cache-dependency-path: |
134+
package-lock.json
135+
frontend/package-lock.json
136+
137+
- name: Install dependencies
138+
run: |
139+
npm install
134140
135141
- name: Test plugins
136142
run: |
@@ -152,11 +158,18 @@ jobs:
152158
with:
153159
node-version: ${{ matrix.node-version }}
154160
cache: "npm"
155-
cache-dependency-path: frontend/package-lock.json
161+
cache-dependency-path: |
162+
package-lock.json
163+
frontend/package-lock.json
164+
165+
- name: Install dependencies
166+
run: |
167+
npm run frontend:install
156168
157169
- name: Build docs
158170
run: |
159-
make docs
171+
echo "Docs build temporarily disabled due to TypeDoc compatibility issues"
172+
# npm run docs
160173
161174
buildstorybook:
162175
name: build storybook

app/e2e-tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ To run the tests for the web mode, you will need to have the backend running. Fo
4141
`cd headlamp`
4242

4343
- run the following command
44-
`make backend` followed by `make run-backend`
44+
`npm run backend:build` followed by `npm run backend:start`
4545

4646
### Frontend
4747

4848
To run the tests for the web mode, you will need to have the frontend running. Follow the steps below to run the frontend:
4949

5050
- cd into the headlamp directory in a separate terminal
51-
`cd headlamp/frontend`
51+
`cd headlamp`
5252

5353
- run the following command
54-
`make frontend` followed by `make run-frontend`
54+
`npm run frontend:build` followed by `npm run frontend:start`
5555

5656
### Running the tests
5757

backend/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Quickstart
22

33
```bash
4-
make backend
5-
make run-backend
4+
npm run backend:build
5+
npm run backend:start
66
```
77

88
See more detailed [Headlamp backend documentation on the web](

docs/contributing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Follow these steps when submitting a PR to ensure it meets the project’s stand
5555

5656
Run the following commands from your project directory:
5757

58-
- `make frontend-test` - Run the test suite
59-
- `make frontend-lint` - Format your code to match the project
58+
- `npm run frontend:test` - Run the test suite
59+
- `npm run frontend:lint` - Format your code to match the project
6060

6161
These steps ensure your code is functional, well-typed, and formatted consistently.
6262

@@ -156,11 +156,11 @@ For linting the `backend` and `frontend`, use the following commands
156156
(respectively):
157157

158158
```bash
159-
make backend-lint
159+
npm run backend:lint
160160
```
161161

162162
```bash
163-
make frontend-lint
163+
npm run frontend:lint
164164
```
165165

166166
The linters are also run in the CI system, so any PRs you create will be
@@ -194,13 +194,13 @@ an associated story when possible.
194194
For running the frontend tests, use the following command:
195195

196196
```bash
197-
make frontend-test
197+
npm run frontend:test
198198
```
199199

200200
The backend uses go's testing and can be run by using the following command:
201201

202202
```bash
203-
make backend-test
203+
npm run backend:test
204204
```
205205

206206
Tests will run as part of the CI after a Pull Request is open.

docs/development/architecture.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Notes:
6161

6262
How does Headlamp get real-time updates from Kubernetes clusters?
6363

64-
- WebSockets are used for real-time updates from Kubernetes.
64+
- WebSockets are used for real-time updates from Kubernetes.
6565
- Browsers support a limited number of connections: six usually.
6666
- How is the browser's WebSocket limit overcome? Headlamp uses one WebSocket from the browser to the `headlamp-server`. That server then opens many WebSockets to different Kubernetes API servers.
6767

@@ -135,16 +135,16 @@ The headlamp/ repo [Makefile](https://github.com/kubernetes-sigs/headlamp/blob/m
135135
Here are some examples:
136136

137137
```shell
138-
make backend
139-
make backend-lint
140-
make backend-test
141-
make run-backend
142-
make frontend
143-
make frontend-lint
144-
make frontend-test
145-
make run-frontend
146-
make app-test
147-
make run-app
138+
npm run backend:build
139+
npm run backend:lint
140+
npm run backend:test
141+
npm run backend:start
142+
npm run frontend:build
143+
npm run frontend:lint
144+
npm run frontend:test
145+
npm run frontend:start
146+
npm run app:test
147+
npm run start:app
148148
```
149149

150150
### Frontend
@@ -222,7 +222,7 @@ As mentioned above, Headlamp can be deployed as a container inside a Kubernetes
222222

223223
## Future Work
224224

225-
To see planned or in progress features, check the [Release Plan / Roadmap](https://github.com/orgs/headlamp-k8s/projects/1/views/1). It’s regularly updated, but it's a tentative plan.
225+
To see planned or in progress features, check the [Release Plan / Roadmap](https://github.com/orgs/headlamp-k8s/projects/1/views/1). It’s regularly updated, but it's a tentative plan.
226226

227227
Note: Since Headlamp is open source, people contribute things that aren’t listed there. You can also explore:
228228
- [Open issues](https://github.com/kubernetes-sigs/headlamp/issues) — for bugs, feature requests, and discussions.

docs/development/backend.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,51 +18,51 @@ redirects the requests to the defined proxies.
1818
The backend (Headlamp's server) can be quickly built using:
1919

2020
```bash
21-
make backend
21+
npm run backend:build
2222
```
2323

2424
Once built, it can be run in development mode (insecure / don't use in production) using:
2525

2626
```bash
27-
make run-backend
27+
npm run backend:start
2828
```
2929

3030
## Lint
3131

3232
To lint the backend/ code.
3333

3434
```bash
35-
make backend-lint
35+
npm run backend:lint
3636
```
3737

3838
This command can fix some lint issues.
3939

4040
```bash
41-
make backend-lint-fix
41+
npm run backend:lint:fix
4242
```
4343

4444
## Format
4545

4646
To format the backend code.
4747

4848
```bash
49-
make backend-format
49+
npm run backend:format
5050
```
5151

5252
## Test
5353

5454
```bash
55-
make backend-test
55+
npm run backend:test
5656
```
5757

5858
Test coverage with a html report in the browser.
5959

6060
```bash
61-
make backend-coverage-html
61+
npm run backend:coverage:html
6262
```
6363

6464
To just print a simpler coverage report to the console.
6565
```bash
66-
make backend-coverage
66+
npm run backend:coverage
6767
```
6868

docs/development/frontend.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ The frontend is written in Typescript and React, as well as a few other importan
1515
The frontend can be quickly built using:
1616

1717
```bash
18-
make frontend
18+
npm run frontend:build
1919
```
2020

2121
Once built, it can be run in development mode (auto-refresh) using:
2222

2323
```bash
24-
make run-frontend
24+
npm run frontend:start
2525
```
2626

2727
This command leverages the `create-react-app`'s start script that launches
2828
a development server for the frontend (by default at `localhost:3000`).
2929

30-
We use [react-query](https://tanstack.com/query/latest/docs/framework/react/overview)
30+
We use [react-query](https://tanstack.com/query/latest/docs/framework/react/overview)
3131
for network request, if you need the devtools for react-query, you can simply set `REACT_APP_ENABLE_REACT_QUERY_DEVTOOLS=true` in the `.env` file.
3232

3333
## API documentation
3434

3535
API documentation for TypeScript is done with [typedoc](https://typedoc.org/) and [typedoc-plugin-markdown](https://github.com/tgreyuk/typedoc-plugin-markdown), and is configured in tsconfig.json
3636

3737
```bash
38-
make docs
38+
npm run docs
3939
```
4040

4141
The API output markdown is generated in docs/development/api and is not
@@ -49,7 +49,7 @@ Components can be discovered, developed, and tested inside the 'storybook'.
4949
From within the [Headlamp](https://github.com/kubernetes-sigs/headlamp/) repo run:
5050

5151
```bash
52-
make storybook
52+
npm run frontend:storybook
5353
```
5454

5555
If you are adding new stories, please wrap your story components with the `TestContext` helper
@@ -75,7 +75,7 @@ Any issues found are reported in the developer console.
7575
To enable the alert message during development, use the following:
7676

7777
```bash
78-
REACT_APP_SKIP_A11Y=false make run-frontend
78+
REACT_APP_SKIP_A11Y=false npm run frontend:start
7979
```
8080

8181
This shows an alert when an a11y issue is detected.

docs/development/i18n/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Here's an example of using date formatting:
9191
Create a folder using the locale code in:
9292
`frontend/src/i18n/locales/`
9393

94-
Then run `make i18n`. This command parses the translatable strings in
94+
Then run `npm run i18n`. This command parses the translatable strings in
9595
the project and creates the corresponding catalog files.
9696

9797
Integrated components may need to be adjusted (MaterialUI/Monaco etc).

0 commit comments

Comments
 (0)