https://github.com/brycerussell/astro-fivem-nui
A template for creating a NUI resource for FiveM using Astro
https://github.com/brycerussell/astro-fivem-nui
Last synced: about 1 year ago
JSON representation
A template for creating a NUI resource for FiveM using Astro
- Host: GitHub
- URL: https://github.com/brycerussell/astro-fivem-nui
- Owner: BryceRussell
- Created: 2023-05-19T03:45:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-30T02:32:46.000Z (about 3 years ago)
- Last Synced: 2025-02-10T07:13:55.613Z (over 1 year ago)
- Language: TypeScript
- Size: 89.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Astro FiveM NUI Template
This is a template for creating a [FiveM](https://fivem.net/) [NUI resource](https://docs.fivem.net/docs/scripting-manual/nui-development/) using Astro
## Features
- Easily build small(<100kb) NUIs
- Tailwind preinstalled for styling
- Image optimization and icons
- Custom NUI utility to make message handling, callbacks, etc easier
## How to Use
### [Using the Dev Enviroment](/dev)
### Setup
1) [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the project into a [local FiveM dev server](https://docs.fivem.net/docs/server-manual/setting-up-a-server/) as a resource
2) Use the terminal to naviagte to the `dev` folder (`cd dev`)
3) Once inside the `dev` folder, use [pnpm](https://pnpm.io/installation#using-npm) to install all dependencies: `pnpm i`
4) Start building your NUI inside the `dev/src/pages/index.astro` file
**Testing in a Browser**:
1) Use the command `pnpm dev` to start a dev server at https://localhost:3000
**Testing In-game**:
1) Use the command `pnpm build` to build your NUI
2) Use the command `restart [resource-name]` inside your FiveM server test the new changes