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: plugin_creator/template/{{ cookiecutter.plugin_name }}/frontend/README.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,29 @@ We use Mantine, running on React, to match the InvenTree stack.
13
13
-[React](https://react.dev/)
14
14
-[Mantine](https://mantine.dev/)
15
15
16
-
###Project Setup
16
+
## Project Setup
17
17
18
18
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.
19
19
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
21
31
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
23
39
24
40
To compile the frontend code, run:
25
41
@@ -33,15 +49,15 @@ Note: The target directory is intentionally outside of the frontend directory, s
33
49
34
50
### Testing
35
51
36
-
To test the frontend code, run:
52
+
To run the frontend code in a test environment, run:
37
53
38
54
```bash
39
55
npm run dev
40
56
```
41
57
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.
43
59
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).
45
61
46
62
### Linting / Formatting
47
63
@@ -60,3 +76,4 @@ npm run lint:fix
60
76
```
61
77
62
78
Any formatting errors will be automatically fixed when you run the `lint:fix` command.
0 commit comments