DEV Community

Cover image for How to share a library on cdnjs
2

How to share a library on cdnjs

Ever wanted to share your library on cdnjs.cloudflare.com? Then, you found the right place! Learn how by reading this post!

1. Requirements

These are the things you need before you start:
A Github account
A public repository for your library

2. Ensure your library meets requirements.

Your library should be open-source and meet the popularity criteria (e.g. 100 stars on Github or 500 downloads/month on npm)

3. Fork the cdnjs Repository.

Go to the cdnjs Github repository and fork it to your own Github account.

4. Add your library.

Open the terminal and clone your forked repository. Create a new directory for your library under the ajax/libs directory. Add your library files and a package.json file with the necessary metadata.

5. Create a Pull Request.

Once you’ve added your library, commit your changes and push them to your forked repository. Then, create a pull request to the main cdnjs repository.

6. Wait for Review.

The cdnjs team will review your pull request. If everything is in order, they’ll merge it, and your library will be available on cdnjs.

7. Conclusion

And that is how to share a library on cdnjs!
Consider leaving comments down below if I missed anything, give a compliment, or suggesting ideas.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay