diff --git a/docs/contributing.md b/docs/contributing.md index 6236d01253..f4cc8f6659 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -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. @@ -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 @@ -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. diff --git a/docs/development/backend.md b/docs/development/backend.md index de3d268e2f..0a4a798a25 100644 --- a/docs/development/backend.md +++ b/docs/development/backend.md @@ -18,13 +18,13 @@ 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 @@ -32,7 +32,7 @@ make run-backend To lint the backend/ code. ```bash -make backend-lint +npm run backend-lint ``` ## Format @@ -40,11 +40,11 @@ make backend-lint To format the backend code. ```bash -make backend-format +npm run backend-format ``` ## Test ```bash -make backend-test +npm run backend-test ``` diff --git a/docs/development/frontend.md b/docs/development/frontend.md index e7243df389..f3477b44d6 100644 --- a/docs/development/frontend.md +++ b/docs/development/frontend.md @@ -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 diff --git a/docs/development/index.md b/docs/development/index.md index 1dc6a2e105..8216929916 100644 --- a/docs/development/index.md +++ b/docs/development/index.md @@ -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 @@ -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 @@ -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.