Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM package statistics and CDN usage instruction #2859

Open
zarianec opened this issue Sep 24, 2021 · 1 comment
Open

NPM package statistics and CDN usage instruction #2859

zarianec opened this issue Sep 24, 2021 · 1 comment

Comments

@zarianec
Copy link

Hey there, first of all thank you for creating a great service!

I have some ideas how to make libraries.io and NPM section in particular even better:

  1. Add usage statistics.
    NPM provides public API for downloads count. It can be used to collect downloads.
    Statistics from public CDNs like jsDelivr can be used as well - see how yarn uses it

  2. Improve installation instructions for NPM packages
    Many packages could be used in a browser directly so it makes sense to provide the example of how to install it using CDN. Tricky part is getting the correct entry point for the package but jsDelivr recently released a new API for that so it can be used as well.

It could look like:


Install

npm install react@17.0.2

Use in browser

<script src="https://cdn.jsdelivr.net/npm/react@17.0.2/umd/react.production.min.js"></script>

I can spend some time on implementing that but must be sure that maintainers are interested in such improvements.

@jimaek
Copy link

jimaek commented Jan 10, 2022

@tiegz what do you think? Should we send a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants