Typescript Boilerplate for alt:V - v4.1.0
Super Fast Compilation
⌨️ Learn how to script for alt:V
❤️ Become a Sponsor of my Open Source Work
💡 Need a Roleplay Script? Try Athena!
⭐ This repository if you found it useful!
A simple Typescript Boilerplate that builds incredibly fast using the SWC Library.
- Full alt:V Type Support for VSCode
- Built in auto-copy for non-typescript files.
- Built in handling of multiple resources for compilation.
- Built in server restart after compilation.
- Easily expandable resource directory.
- altv-pkg support for auto-downloading alt:V Server Binaries.
- Prettier Configuration for code formatting.
- Tried and tested and used by the Athena Framework for over 1 year.
Use the command below in any terminal, command prompt, etc.
git clone https://github.com/Stuyk/altv-typescript
Use the command below in any terminal, command prompt, etc.
cd altv-typescript
npm install
Use the command below in any terminal, command prompt, etc. This will download all necessary server files from an additional package used by this project.
npm run update
Use the command below in any terminal, command prompt, etc. This will build your TypeScript code into JavaScript.
npm run build
Run this command to run the server in production mode.
npm run windows
Run this command to run the server in production mode.
npm run linux
Run this command to run the server in development mode.
npm run dev
Use the key combination ctrl + c
to kill your server in your terminal, command prompt, etc.
This quickstart repository for Typescript allows mods.
However, do not put your resources in the resources
folder.
Instead you should put resources, mods, etc. in the src
folder in their own folder. They will be automatically copied to the resources
folder after the code is transpiled.