Skip to content
/ cef-boilerplate Public template

A React + TypeScript template for creating CEF screens in RageMP.

Notifications You must be signed in to change notification settings

ziyacivan/cef-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cef-boilerplate

This repository is a template for creating CEF screens using React with TypeScript for a RageMP server.

Getting Started

Follow these steps to set up and use the repository:

Prerequisites

Make sure you have the following installed on your system:

  • Node.js (version 18.x or later)
  • npm (version 6.x or later)

Installation

  1. Clone the repository

    git clone https://github.com/your-username/cef-boilerplate.git
  2. Navigate into the project directory

     cd cef-boilerplate
  3. Install the dependencies

    npm install

Development

To start the development server, run:

npm start

This will start a development server at http://localhost:3000 where you can see your changes live.

Building for Production

To create a production build, run:

npm run build

This will generate a build folder containing the optimized production build of your React application.

Using in RageMP

After building your project, follow these steps to use it in your RageMP server:

  1. Copy the build folder

    Copy the contents of the build folder to your RageMP server's client_packages directory.

  2. Reference the CEF screens in your RageMP scripts

    Ensure that your RageMP server scripts correctly reference the CEF screens you've built. This will typically involve specifying the HTML files within your client-side scripts.

Project Structure

  • src/: Source files for your React application.
  • public/: Public assets that will be copied to the build folder.
  • build/: The production build of your React application (generated by npm run build).

Contributing

Feel free to submit issues or pull requests to improve this template repository.

License

This project is licensed under the MIT License.

About

A React + TypeScript template for creating CEF screens in RageMP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published