feat(es_extended) Dynamic Modules #1557
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a dynamic module system to the ESX Framework. The key features and purposes of this system are as follows:
Motivation
The dynamic module system aims to improve the modularity and flexibility of the ESX Framework, allowing developers to extend and customize the framework more efficiently. This system is particularly useful for code that does not need to run within the ESX Core but inside the resource that requires it. For example:
Usage isntructions
^ You can either return a table in the module and use it like i provided down below with the "db" module, or you can use it like in the blip module, just creating glboal functions.
Example
Although you can find an example in client/dynamicModules/blip.lua, i will provide another one:
Expandable code, just showing what it could be used for
Loading a module that is in a different resource