jasonsturges/lunarphase-js

CDN

Zenahr opened this issue · 6 comments

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

@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/lunarphase-js@1.0.10/dist/browser/lunarphase-js..js

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

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

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 Hi, yeah - haven't worked on this, but I think the unpkg works in a script tag?

https://unpkg.com/lunarphase-js@1.0.10/dist/browser/lunarphase-js..js

Usage with esm.sh:

import { Moon } from "https://esm.sh/lunarphase-js";
Moon.lunarAge();