Skip to content

Commit

Permalink
docs: Remove Make from contrib guide for frontend/backend commands
Browse files Browse the repository at this point in the history
Signed-off-by: René Dudfield <[email protected]>
  • Loading branch information
illume committed Nov 15, 2024
1 parent 5ba631a commit 20201dd
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 21 deletions.
12 changes: 6 additions & 6 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Follow these steps when submitting a PR to ensure it meets the project’s stand
Navigate to the `frontend` folder and run the following commands:

- `cd frontend`
- `make frontend-test` - Run the test suite
- `make frontend-lint` - Format your code to match the project
- `npm run test` - Run the test suite
- `npm run lint` - Format your code to match the project

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

Expand Down Expand Up @@ -159,11 +159,11 @@ For linting the `backend` and `frontend`, use the following commands
(respectively):

```bash
make backend-lint
npm run backend-lint
```

```bash
make frontend-lint
npm run frontend-lint
```

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

```bash
make frontend-test
npm run frontend-test
```

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

```bash
make backend-test
npm run backend-test
```

Tests will run as part of the CI after a Pull Request is open.
10 changes: 5 additions & 5 deletions docs/development/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@ redirects the requests to the defined proxies.
The backend (Headlamp's server) can be quickly built using:

```bash
make backend
npm run backend
```

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

```bash
make run-backend
npm run run-backend
```

## Lint

To lint the backend/ code.

```bash
make backend-lint
npm run backend-lint
```

## Format

To format the backend code.

```bash
make backend-format
npm run backend-format
```

## Test

```bash
make backend-test
npm run backend-test
```
4 changes: 2 additions & 2 deletions docs/development/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ The frontend is written in Typescript and React, as well as a few other importan
The frontend can be quickly built using:

```bash
make frontend
npm run frontend
```

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

```bash
make run-frontend
npm run run-frontend
```

This command leverages the `create-react-app`'s start script that launches
Expand Down
26 changes: 18 additions & 8 deletions docs/development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,39 @@ These are the required dependencies to get started. Other dependencies are pulle

- [Node.js](https://nodejs.org/en/download/) Latest LTS (20.11.1 at time of writing). Many of us use [nvm](https://github.com/nvm-sh/nvm) for installing multiple versions of Node.
- [Go](https://go.dev/doc/install), (1.22 at time of writing)
- [Make](https://www.gnu.org/software/make/) (GNU). Often installed by default. On Windows this can be installed with the "chocolatey" package manager that is installed with node.
- [Kubernetes](https://kubernetes.io/), we suggest [minikube](https://minikube.sigs.k8s.io/docs/) as one good K8s installation for testing locally. Other k8s installations are supported (see [platforms](../platforms.md).


## Run the app

`npm start`

This will run back the backend, the frontend in development mode, and the app in development mode.

This is the quickest way to get started and see if everything is working. It may take a while to get going the first time as it installs things and warms up.

See below for running the frontend and backend separately to work in the web browser which is more convenient than developing in the app.

## Build the code

Headlamp is composed of a `backend` and a `frontend`.

You can build both the `backend` and `frontend` by running.
You can build both the `backend` and `frontend` by running:

```bash
make
npm run backend && npm run frontend
```

Or individually:

```bash
make backend
npm run backend
```

and

```bash
make frontend
npm run frontend
```

## Run the code
Expand All @@ -47,13 +57,13 @@ The quickest way to get the `backend` and `frontend` running for development is
the following (respectively):

```bash
make run-backend
npm run run-backend
```

and in a different terminal instance:

```bash
make run-frontend
npm run run-frontend
```

## Build the app
Expand All @@ -66,7 +76,7 @@ and the linux app on a linux box.
First, we need to

```bash
make backend frontend
npm run backend && npm run frontend
```

Then choose the relevant command.
Expand Down

0 comments on commit 20201dd

Please sign in to comment.