Node.js
is a JavaScript runtime and is used for building applications. In the context of FiveM it is necessary to bundle resources into a single package that can be ran on both the server and client.
- Download and install the LTS version of Node.js
- Once installed you can open a command-line terminal (e.g.
Terminal
orCommand Prompt
) and enternode --version
to confirm the expected version has been installed correctly
pnpm
pnpm
is a fast and disk-space-efficient package manager, serving as an alternative to npm
and yarn
.
- Ensure you have installed
Node.js
properly (see section above) - Open a command-line terminal (e.g.
Terminal
orCommand Prompt
) - Enter
npm install -g pnpm
to globally install the pnpm package to your environment
With both Node.js and pnpm installed you can move on to installing the dependencies for ht_mlotool.
- Open a command-line terminal (e.g.
Terminal
orCommand Prompt
) - Navigate to the
ht_mlotool/web
folder in your command-line terminal - Enter
pnpm i
to install the dependencies for the project
If you want to make UI changes first make sure that you are working off of a Fork of the repository or download a source version of the code.
This resource utilizes Mantine v5 as its UI component library, please familiarize yourself with it before diving into any UI edits.
Style changes can be made in any number of places, however the three main locations are as follows:
- ht_mlotool/web/src/index.css
- ht_mlotool/web/src/App.tsx:useStyles
- In-line with the given element that you want to edit the style of
- See Mantine's Style documentation for more information
- Open a command-line terminal (e.g.
Terminal
orCommand Prompt
) - Navigate to the
ht_mlotool/web
folder in your command-line terminal - Enter
pnpm start
to start up a locally-accessible web server that can used to iterate quickly on UI changes
- Open a command-line terminal (e.g.
Terminal
orCommand Prompt
) - Navigate to the
ht_mlotool/web
folder in your command-line terminal - Enter
pnpm start:game
to start up a service that will actively rebuild the package whenever changes are detected - Ensure the resource in-game to pick up the updated package