A Typescript Boilerplate for RAGE:MP with simple setup and usage.
Remember to 🌟 this Github if you 💖 it.
For Javascript Edition, see: ragemp-javascript
- Full RAGE:MP Type Support for VSCode
- Built in rollup config for transpile and auto-copy (incredibly fast using the SWC)
- Prettier Configuration for code formatting.
Use the command below in any terminal, command prompt, etc.
git clone https://github.com/leonardssh/ragemp-typescript.git
Use the command below in any terminal, command prompt, etc.
cd ragemp-typescript
npm install
Without it, rollup will not be able to copy the files properly
The boilerplate comes with 2 compilers:
- SWC - ⚡ultra fast (no support for const enums)
- Typescript - 🐢 very slow (support for const enums)
To use SWC, set
COMPILER_USE_SWC
to true, and forTYPESCRIPT
to false
PRODUCTION_MODE=false
COMPILER_USE_SWC=true // <--- CHANGE THE COMPILER BETWEEN SWC & TYPESCRIPT
Use the command below in any terminal, command prompt, etc. This will transpile and copy the files to the dist
folder. Folder which is used for production.
npm run build
Grab the server files from RAGEMP/server-files
and drop them in the dist
folder.
cd ./dist
./ragemp-server.exe
To contribute to this repository, feel free to create a new fork of the repository and submit a pull request.
- Fork / Clone and select the
main
branch. - Create a new branch in your fork.
- Make your changes.
- Commit your changes, and push them.
- Submit a Pull Request here!
This project is licensed under the MIT License - see the LICENSE file for details.