Skip to content

Commit ccd715c

Browse files
Update README with project setup and translation info
Added installation and translation instructions to README.
1 parent 7acdfb2 commit ccd715c

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

  • plugin_creator/template/{{ cookiecutter.plugin_name }}/frontend

plugin_creator/template/{{ cookiecutter.plugin_name }}/frontend/README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,29 @@ We use Mantine, running on React, to match the InvenTree stack.
1313
- [React](https://react.dev/)
1414
- [Mantine](https://mantine.dev/)
1515

16-
### Project Setup
16+
## Project Setup
1717

1818
This project uses [Vite](https://vitejs.dev/) as the build tool. We followed [this guide](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) to scaffold the project.
1919

20-
### Building
20+
*Note: The following instructions assume you are already in the `frontend` directory.*
21+
22+
### Install Frontend Libraries
23+
24+
Install the required frontend libraries:
25+
26+
```bash
27+
npm install
28+
```
29+
30+
### Translate
2131

22-
*Note: Assumed you are already in the `frontend` directory.*
32+
If you have translation support enabled, run:
33+
34+
```bash
35+
npm run translate
36+
```
37+
38+
### Building
2339

2440
To compile the frontend code, run:
2541

@@ -33,15 +49,15 @@ Note: The target directory is intentionally outside of the frontend directory, s
3349

3450
### Testing
3551

36-
To test the frontend code, run:
52+
To run the frontend code in a test environment, run:
3753

3854
```bash
3955
npm run dev
4056
```
4157

42-
This will start a development server (usually on `localhost:5173`) which will automatically reload when changes are made to the source code.
58+
This will start a development server (usually on `localhost:5174`) which will automatically reload when changes are made to the source code.
4359

44-
The development server provides some "dummy" harness data to test the frontend code.
60+
Note: You will also need the InvenTree frontend dev server to be running on `localhost:5173` (using `invoke dev.frontend-server` in the InvenTree project).
4561

4662
### Linting / Formatting
4763

@@ -60,3 +76,4 @@ npm run lint:fix
6076
```
6177

6278
Any formatting errors will be automatically fixed when you run the `lint:fix` command.
79+

0 commit comments

Comments
 (0)