-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Suggestion: Release on CDNJS.com #158
Comments
It looks like someone did this (wahoo!): I think this can be closed. |
The version is outdated. I guess since we now have release 1.0.0, something can be done to update CDNJS. |
@thednp I configured the autopupdate on jsdelivr. (https://github.com/jsdelivr/jsdelivr/tree/master/files/prism) |
Thanks, as I can see the jsdeliver repository, there is no prism.min.js and prism.min.css, so you better check that too. |
No, there are all themes, all components (minified), all plugins (minified) and a default prism.js file that is mainly used for Prism's website, currently. We can argue about the minification of the themes, but well, I think we're ok for now. |
Both CDNJS and jsDeliver look up to date. I'm closing this issue. |
👍 |
Is there a simple example / html file that demonstrates how to use the cdn? been trying to get this working: https://codesandbox.io/s/4xm5lzvkn7 |
@NullVoxPopuli Unfortunately, using the CDN, you need to handle language dependencies yourself. Handlebars requires Markup-templating, so a working example would be: https://codesandbox.io/s/3vx76wq76m |
Why not put a "Complete" js on CDN that includes all languages... and each theme css as individual CDN files. that way the developer only has two files to include from CDN. If anyone doesn't want everything included they can still build their own version. |
@hades200082 I'm pretty sure this has been suggested before, but I'm unable to find the thread I'm looking for. Yet, there are short discussions about this in #174 (comment) and #768 (comment). This would be a ~274Kb (minified) file, though. Do we really want people to load such a file? |
@Golmote You wouldn't want to use it in production, but if you're pulling together like a small demo or something, it would be easier setup than figuring out exactly what languages you need. The counterpoint is it could easily be a "go-to" when people have problems (e.g. the |
@mAAdhaTTah That's definitely what I'm worried about. I guess we could add a message warning about the file size, so that we don't hold the responsability... |
Just to take a step back, what's the use case / user flow that we're trying to solve here? @hades200082 since you made the suggestion, how are you thinking about using it? |
CDNJS is a free Content Delivery Network hosted by CloudFlare for open source, community-driven projects. It would be great to release prism on CDNJS for all to use.
Instructions to add a project to CDNJS:
https://github.com/cdnjs/cdnjs
PS. Or you can simply add a tag to current version, and I'll do the rest.
The text was updated successfully, but these errors were encountered: