instafluff / ComfyJS

Comfiest Twitch Chat Library for JavaScript | NodeJS + Browser Support
MIT License
404 stars 44 forks source link

Permit direct module import? #7

Open Rosuav opened 4 years ago

Rosuav commented 4 years ago

Currently, ComfyJS is available either by copying it to your own project, or using NPM. If this repo had GitHub Pages active, it could also be available as:

import ComfyJS from "https://instafluff.github.io/ComfyJS/dist/comfy";

or equivalently:

<script type=module src="https://instafluff.github.io/ComfyJS/dist/comfy"></script>

I'm okay with copying an MIT-licensed file into my own project from a licensing perspective, but it means that any project using this is going to be frozen in time, upgrading only when it's explicitly redownloaded.

hugodahl commented 4 years ago

Hey @Rosuav! Don't know if this is still an issue or something you're needing, but if so, @instafluff added some details in the README on using the jsdelivr.net CDN.

So to use it in the manner you mentioned, you'd just need to use https://cdn.jsdelivr.net/npm/comfy.js/dist/comfy.min.js as the URL.

instafluff commented 4 years ago

OH! Thank you so much @hugodahl I forgot about this open issue!

Rosuav commented 4 years ago

Ah, cool. Thanks. It still can't be directly imported into the local namespace due to compatibility difficulties across the multiple use-cases, but I can at least remove it from my repo.

Would be awesome if it could actually be imported directly, but that would probably break compatibility with non-module usage. At very best, it would require non-module users to say " Githubissues.

  • Githubissues is a development platform for aggregating issues.