maplibre-gl-js icon indicating copy to clipboard operation
maplibre-gl-js copied to clipboard

publish to JSR

Open birkskyum opened this issue 1 year ago • 3 comments
trafficstars

It would be great to get on the JSR registry as it's taking off.

Since it's esm-only this is blocked by:

  • #1595

birkskyum avatar Mar 06 '24 08:03 birkskyum

Thanks for sharing! I think we might be able to try again and export an esm build now that I have removed the global object. If it's only adding another entry in the rollup config it should be failry easily. I don't know about the other part related to JSR and I'll be surprised if we could upload the code "as is", maybe the csp code can be uploaded as it's "less complicated" I believe, IDK, would be interesting to try out.

HarelM avatar Mar 06 '24 09:03 HarelM

It's a bit early, so I think it'll be significantly harder at this point to land jsr support than manually making the esm bundles (#1595), because jsr.io want to take .ts source code and make a analyze it, do a build, .d.ts, docs, etc., and I don't know how it'll will handle our need for multiple bundles (worker bundle etc.) - if it can read our rollup.config. They kinda have to support that, but I don't know if they do at this point.

birkskyum avatar Mar 06 '24 09:03 birkskyum

Yeah, although if we still need a rollup.config file and all we get is d.ts file and API docs (and if I needed to guess they probably are using the same tools we are using - dts bundle generator or api-extractor, and typedoc) then there's not a lot of added value here. But it probably can't hurt to keep an eye on this.

HarelM avatar Mar 06 '24 10:03 HarelM

Sent an invite to @birkskyum for the @maplibre scope on JSR.

louwers avatar Oct 27 '24 10:10 louwers