trailheadlabs / outerspatial-map-library

A Leaflet plugin built for use in OuterSpatial
https://www.trailheadlabs.com/labs/outerspatial-map-library/
Other
6 stars 1 forks source link

Implement "latest" content delivery network endpoint #62

Open nateirwin opened 7 years ago

nateirwin commented 7 years ago

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.

nateirwin commented 7 years ago

We should also support requesting the latest for a particular major version (e.g. 7.latest or something like that).

nateirwin commented 6 years ago

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:

We could start small and expand scope, if needed, over time.