abhiss / fivem-ts-boilerplate

Typescript Boilerplate for FiveM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fivem-ts-boilerplate

🔥 A Typescript Boilerplate for FiveM 🎮

License: MIT Last commit Discord

This is a basic boilerplate for creating a FiveM resource using Typescript. It includes webpack config files and a directory structure to get you started. We recommend to use fivem-js alongside this boilerplate for faster development of client scripts.

Usage

  1. Clone repository into your resources/[local] folder.
  2. npm i the dependencies.
  3. Start development.

Development

Use npm run watchc and npm run watchs to watch files during development.

Production

Build your production ready code with npm run build.

This will build the client and server script with the --mode production flag.

Automatic Builds (Optional)

The fxmanifest.lua is not setup to automatically build upon first FXServer start. If you'd like to setup automatic builds you must add the following to your fxmanifest.lua.

dependency 'yarn'
dependency 'webpack'

webpack_config 'client.config.js'
webpack_config 'server.config.js'

License

This product is MIT licensed. Please make sure you give credit and include this license in your product.

About

Typescript Boilerplate for FiveM

License:MIT License


Languages

Language:JavaScript 74.1%Language:Lua 22.3%Language:TypeScript 3.6%