maptool
maptool copied to clipboard
[Feature]: Add the ability for add-ons to specify which other add-ons they depend on.
Feature Request
There should be a way for Add-Ons to specify which other Add-Ons they depend on. Add-Ons will be initialised after all their dependencies are initialised.
The Solution you'd like
Add a requires
property to the library.json
library metadata to list all the Add-Ons they depend on.
requires
will be an array of namespaces to allow dependency on more than a single Add-On.
Add-Ons will not be initialised until all the Add-Ons they depend on have been initialised.
Alternatives that you've considered.
Having requires
be an array of objects to specify the version, e.g.
{
"requires": [
{
"namespace": "net.somelib",
"version": "1.1.0"
}
]
}
but this adds complexity that I am not sure we will need and is harder to add to the JSON file for users than just strings. If versions are required in the future they could be added to the string (e.g. "net.somelib:1.1.0")
Additional Context
No response