Skip to content

overextended/fivem-typescript-boilerplate

Repository files navigation

fivem-typescript-boilerplate

A boilerplate for creating FiveM resources with TypeScript.

Getting Started

Node.js v18+

Install any LTS release of Node.js from v18.

pnpm

Install the pnpm package manager globally.

npm install -g pnpm

Setup

Initialise your own repository by using one of the options below.

Navigate to your new directory and execute the following command to install dependencies.

pnpm install

Development

Use pnpm watch to actively rebuild modified files while developing the resource.

During web development, use pnpm web:dev to start vite's webserver and watch for changes.

Build

Use pnpm build to build all project files in production mode.

To build and create GitHub releases, tag your commit (e.g. v1.0.0) and push it.

Layout

  • /dist/
    • Compiled project files.
  • /locales/
    • JSON files used for translations with ox_lib.
  • /scripts/
    • Scripts used in the development process, but not part of the compiled resource.
  • /src/
    • Project source code.
  • /static/
    • Files to include with the resource that aren't compiled or loaded (e.g. config).