dopecodez / Wikipedia

Wikipedia for node and the browser
MIT License
82 stars 19 forks source link

Clarity on browser support #37

Closed DevSpen closed 2 years ago

DevSpen commented 2 years ago

The README claims that the package can be used in browsers, but I couldn't find any documentation on it.

Is this actually feasible, how so?

dopecodez commented 2 years ago

You can import the package and use it directly if you are using react, angular or similar frameworks.

The same documentation will work for that as well.

DevSpen commented 2 years ago

What about a CDN? For the project I'm working on, I’m not using any frameworks.

dopecodez commented 2 years ago

I like the idea of having a cdn that can make life easier to use directly in HTML files or script tags.

Perhaps we could use a framework like https://github.com/cdnjs/cdnjs which will make the process of delivery and updating much easier.

To answer the question, we don't have a cdn file available now but it is something we should definitely consider doing as it will increase the overall useability of the project.

DevSpen commented 2 years ago

I like the idea of having a cdn that can make life easier to use directly in HTML files or script tags.

Perhaps we could use a framework like https://github.com/cdnjs/cdnjs which will make the process of delivery and updating much easier.

To answer the question, we don't have a cdn file available now but it is something we should definitely consider doing as it will increase the overall useability of the project.

Thank you!

dopecodez commented 2 years ago

So on taking a look at this Yarn already by default provides unpkg and jsDelivr, both of which are cdns available for open source projects. We can use these instead of building a cdn. Take a look at https://yarnpkg.com/package/wikipedia to see the links we get by default. You can see how to use jsDelivr by taking a look at this link - https://www.jsdelivr.com/features .

With these features available by default we can use this and not spend time on creating another cdn.