@byte-fw/byte v0.5.0
Byte
Byte is a framework for the Cfx.re plattform FiveM. It is written in TypeScript and transpiled to lua using a fork of tstl. The whole framework is stiched together using the jade build tool.
Building
Once you have jade installed, simply navigate to the framework's root directory and execute jade .. Make sure to have bun installed. By default the build is performed using bun, if you don't want to use bun simply replace the package_manager key in every build step inside the jade.json file with your preferred node package manager, e.g. pnpm.
Docs
Client reference Server reference
!NOTE All docs for
sharedare replicated in both references.
Dependencies
- Byte-pg: Minimal PostgreSQL wrapper
Code guidelines
- All the config files are written in the
xmlformat and are stored under theassets/folder. - Some native lua modules, such as the XML parser, are stored in the
lua/folder. - The type definition for the object exported by the framework to other resources can be found in
client/events/export.ts&server/events/export.ts. - When building the framework, the exported type definitions can be found inside
build/client/byte-client.d.ts&build/server/byte-server.d.ts.
Batteries included framework
The Byte framework aims to satisfy all the needs of a developper by providing all the helper classes and utilities that one could ever need. Some of the classes included are:
- Logger
client/utils/logger.tsserver/utils/logger.ts: Logger class that features different log tracing levels and module tracing. - EnvManager
client/utils/env.tsserver/utils/env.ts: Static class that provides the code with the env vars that the user defines inside theserver.cfgconfig file. - ConfigController
shared/classes/configController.ts: Parses the framework'sconfig.xmlfile and provides the code with parsed values. - Translator
shared/classes/translator.ts: Parses thelocales.xmlfile and provides the translations for the selected language. - XML
shared/classes/xml.ts: Utility class to help with the navigation of xml documents.
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago