This directory contains the frontend code for the InvenTree Test Statistics plugin.
The frontend code is designed to integrate natively with the InvenTree user interface.
We use Mantine, running on React, to match the InvenTree stack.
This project uses Vite as the build tool. We followed this guide to scaffold the project.
Note: Assumed you are already in the frontend
directory.
To compile the frontend code, run:
npm run build --emptyOutDir
This will compile the frontend into the ../test_statistics/static
directory (ready for distribution).
Note: The target directory is intentionally outside of the frontend directory, so that the compiled files are correctly bundled into the python package install.
To test the frontend code, run:
npm run dev
This will start a development server (usually on localhost:5173
) which will automatically reload when changes are made to the source code.
The development server provides some "dummy" harness data to test the frontend code.