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

Suggestion: Release on CDNJS.com #158

Closed
wmh opened this issue Aug 28, 2013 · 15 comments
Closed

Suggestion: Release on CDNJS.com #158

wmh opened this issue Aug 28, 2013 · 15 comments

Comments

@wmh
Copy link

wmh commented Aug 28, 2013

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.

git tag 1.0.0
git push --tags
@loganfranken
Copy link
Contributor

It looks like someone did this (wahoo!):
https://cdnjs.com/libraries/prism

I think this can be closed.

@Golmote
Copy link
Contributor

Golmote commented Jun 20, 2015

The version is outdated. I guess since we now have release 1.0.0, something can be done to update CDNJS.

@thednp
Copy link

thednp commented Oct 6, 2015

Please change/add CDN provider. I use jsDeliver, it automatically adds new release tags to clouds.
The 0.0.1 version on cdnjs is pretty buggy with JS.

Update
I found it on jsdeliver but it's still the old version!

@Golmote
Copy link
Contributor

Golmote commented Oct 8, 2015

@thednp I configured the autopupdate on jsdelivr. (https://github.com/jsdelivr/jsdelivr/tree/master/files/prism)

@thednp
Copy link

thednp commented Oct 8, 2015

Thanks, as I can see the jsdeliver repository, there is no prism.min.js and prism.min.css, so you better check that too.

@Golmote
Copy link
Contributor

Golmote commented Oct 8, 2015

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.

@Golmote
Copy link
Contributor

Golmote commented Jul 5, 2016

Both CDNJS and jsDeliver look up to date. I'm closing this issue.

@Golmote Golmote closed this as completed Jul 5, 2016
@wmh
Copy link
Author

wmh commented Jul 5, 2016

👍

@NullVoxPopuli
Copy link

NullVoxPopuli commented May 17, 2018

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

@Golmote
Copy link
Contributor

Golmote commented May 18, 2018

@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

@hades200082
Copy link

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.

@Golmote
Copy link
Contributor

Golmote commented May 20, 2018

@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?

@mAAdhaTTah
Copy link
Member

@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 markup-templating issue) that blows up their site weight without thinking deeply about what the problem is.

@Golmote
Copy link
Contributor

Golmote commented May 20, 2018

@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...

@mAAdhaTTah
Copy link
Member

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?

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

7 participants