lunarphase-js icon indicating copy to clipboard operation
lunarphase-js copied to clipboard

CDN

Open Zenahr opened this issue 3 years ago • 6 comments
trafficstars

Any option to use the library via CDN or as a minified JS file? (in other words: non-NPM setups)

Zenahr avatar Jul 09 '22 23:07 Zenahr

@Zenahr Hi, been wanting to explore this but haven't gotten around to it.

You could use unpkg, which would provide unminified UMD build (2.9k): https://unpkg.com/[email protected]/dist/browser/lunarphase-js..js

Let me see if I can provider something better in the near future.

jasonsturges avatar Jul 10 '22 00:07 jasonsturges

Going to reopen this as a reminder to complete this task - I've been meaning to do this for some time.

jasonsturges avatar Jul 13 '22 04:07 jasonsturges

Found my way here as well since I was hoping to use the library but am also in a more barebones environment without access to NPM.

marcthayer avatar Nov 28 '23 20:11 marcthayer

@marcthayer Hi, yeah - haven't worked on this, but I think the unpkg works in a script tag?

https://unpkg.com/[email protected]/dist/browser/lunarphase-js..js

jasonsturges avatar Nov 28 '23 20:11 jasonsturges

@marcthayer Oh, the version updated as of 2x you would target:

And corresponding maps should be there as well, for example with IIFE:

Does that work for you?

jasonsturges avatar Nov 28 '23 20:11 jasonsturges