Open nateirwin opened 7 years ago
We should also support requesting the latest for a particular major version (e.g. 7.latest or something like that).
Thinking about how we may be able to implement this: We could create a JSON index file that contains information about Map Library releases as part of the deploy script. This file could be as simple as an object for each major release number that holds an array of release numbers, e.g.:
{
5: [
"5.0.0",
"5.0.1"
],
6: [
"6.0.0",
"6.0.1"
],
7: [
"7.0.0",
"7.0.1"
]
}
We could then add an endpoint to either outerspatial or outerspatial-utilities that grabs this JSON file, parses it, and responds to requests that include parameters. We could support a few different parameters. Off the top of my head:
/outerspatial-map-library?version=latest|7|7.1|7.1.1
: "latest" would get the latest release, "7" would get the latest 7.x release, "7.1" would get the latest 7.1.x release, and "7.1.1" would get that specific release/outerspatial-map-library?version=latest&minified=false
: would return the latest version of the un-minified codeWe could start small and expand scope, if needed, over time.
This will be a URL we can use to always pull in the latest version of OuterSpatial Map Library. It should only be used sparingly, but it would be useful for one-off web maps that we don't want to have to keep updated all the time.