This repository is a template for creating CEF screens using React with TypeScript for a RageMP server.
Follow these steps to set up and use the repository:
Make sure you have the following installed on your system:
- Node.js (version 18.x or later)
- npm (version 6.x or later)
-
Clone the repository
git clone https://github.com/your-username/cef-boilerplate.git
-
Navigate into the project directory
cd cef-boilerplate
-
Install the dependencies
npm install
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.
To create a production build, run:
npm run build
This will generate a build folder containing the optimized production build of your React application.
After building your project, follow these steps to use it in your RageMP server:
-
Copy the build folder
Copy the contents of the build folder to your RageMP server's
client_packages
directory. -
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.
src/
: Source files for your React application.public/
: Public assets that will be copied to thebuild
folder.build/
: The production build of your React application (generated bynpm run build
).
Feel free to submit issues or pull requests to improve this template repository.
This project is licensed under the MIT License.