Giter VIP home page Giter VIP logo

ragemp-typescript's Introduction

A Typescript Boilerplate for RAGE:MP with simple setup and usage.


Remember to 🌟 this Github if you πŸ’– it.

For Javascript Edition, see: ragemp-javascript

πŸ“Œ Features

  • 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.

πŸ“₯ Installation

Prerequisites

Clone the Repository

Use the command below in any terminal, command prompt, etc.

git clone https://github.com/leonardssh/ragemp-typescript.git

Install the necessary modules

Use the command below in any terminal, command prompt, etc.

cd ragemp-typescript
npm install

Rename the .env.example file to .env

Without it, rollup will not be able to copy the files properly

Compiler Configuration

The boilerplate comes with 2 compilers:

  1. SWC - ⚑ultra fast (no support for const enums)
  2. Typescript - 🐒 very slow (support for const enums)

To use SWC, set COMPILER_USE_SWC to true, and for TYPESCRIPT to false

PRODUCTION_MODE=false
COMPILER_USE_SWC=true // <--- CHANGE THE COMPILER BETWEEN SWC & TYPESCRIPT

Build the server

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

Get Server Files

Grab the server files from RAGEMP/server-files and drop them in the dist folder.

Start the Server

cd ./dist
./ragemp-server.exe

πŸ‘¨β€πŸ’» Contributing

To contribute to this repository, feel free to create a new fork of the repository and submit a pull request.

  1. Fork / Clone and select the main branch.
  2. Create a new branch in your fork.
  3. Make your changes.
  4. Commit your changes, and push them.
  5. Submit a Pull Request here!

πŸ“‹ License

This project is licensed under the MIT License - see the LICENSE file for details.

ragemp-typescript's People

Contributors

dyingg avatar leonardssh avatar ziyacivan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.