While building thecodingmachine/discovery
, a great deal of work has been done to make sure that assets are returned in a useful and predictable order.
If packages have no dependencies, they are returned in alphabetical order.
In the example above, assets will be returned in this order:
You can however alter this order using the priority
modifier.
discovery.json
{
"some_asset_type": [
{
"value": "some_value",
"priority": 99
}
]
}
The default priority is 0.
Values with higher priorities will come first in the array.
Values with the same priority are ordered first by package dependency order, then by alphabetical order.
Found a typo? Something is wrong in this documentation? Just fork and edit it!