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

Add to CDNJS #214

Closed
andyfangaf opened this issue Jun 25, 2016 · 5 comments · May be fixed by NOUIY/preact#51, NOUIY/preact#77 or NOUIY/preact#97
Closed

Add to CDNJS #214

andyfangaf opened this issue Jun 25, 2016 · 5 comments · May be fixed by NOUIY/preact#51, NOUIY/preact#77 or NOUIY/preact#97

Comments

@andyfangaf
Copy link

Would be great to have this as a CDN package so it's easily accessible on Codepens, etc.

@developit
Copy link
Member

developit commented Jun 25, 2016

Sure! I'm not familiar with the process for this - any pointers?

Currently, I just recommend that everyone use the lovely npmcdn by @mjackson:

latest stable (4.8.0): https://npmcdn.com/preact
latest beta (5.1.0-beta.19): https://npmcdn.com/preact@beta

The nice part about this is you can pass any semver range as @version, so you can take advantage of the fact that minor version changes shouldn't break your Codepens, but still get the latest version of the library.

Also, it hosts all the npm dist files, including Preact's optimized .min build: npmcdn.com/preact@beta/dist/preact.min.js

@andyfangaf
Copy link
Author

Ah, after looking into the docs more it seems like npmcdn could work. The main benefit of cdnjs is it's discoverability on search engines.

@developit
Copy link
Member

Yes, and I think that's also what Codepen uses for their built-in JS library search. I can look into getting Preact added there.

@developit
Copy link
Member

PR to cdnjs is here: cdnjs/cdnjs#8391

@developit
Copy link
Member

Yay, we're on CDNJS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment