Closed ungoldman closed 8 years ago
:zap:
@jgravois wondering if you have an opinion on the best way to do this -- would be nice to use the CDN via
<script src="http://cdn-geoweb.s3.amazonaws.com/esri-leaflet/1.0.0-rc.6/esri-leaflet.js"></script>
rather than committing esri-leaflet's minified source to koop.
@chelm what part of koop handles public/
getting served?
i agree. CDN seems like the simplest, least maintenance way to go.
I actually think that the esri-leaflet in the code base is not being used. Each provider that supports a "preview" endpoint should be using the CDN (and be kept up-to-date in those repos). Unless we want to refactor the way the demo views in the providers work to include the libs in a more central way.
koop-socrata example: https://github.com/koopjs/koop-socrata/blob/master/views/demo.ejs#L54
So I'll verify that we can just blow away the checked in esri-leaflet code today.
@chelm makes sense to me. we probably don't need a public
folder at all then, right?
@ngoldman I have removed the local esri-leaflet code, but we still need the public dir for public/js/map.js
which is the shared logic for providers that have a preview method. This could change easily and we could say its up the to providers to be completely self-sustaining in they're support for things like views and maps and such.
I think this is an artifact of the old way koop was built as one big piece. So we just need to make a decision and either leave it and doc that its there and how to use it, or blow it away and duplicate it in the providers that want it.
@chelm is this something that could act as a plugin?
@ngoldman good question. potentially yes but its a bit different. It could re-thought to be plugin I suppose. Let me ponder on that today.
Moving towards removing preview
from Koop altogether (v3).
Esri-Leaflet needs to be updated in individual providers for now.
Noticed esri-leaflet is quite out of date:
Will open a PR to bump to latest (currently
1.0.0-rc.6
) when I get a chance.