cdnjs #39

Open
opened 2026-01-29 14:55:11 +00:00 by claunia · 7 comments
Owner

Originally created by @idleberg on GitHub (Feb 4, 2015).

Would be nice to have the CSS files hosted on cdnjs (and jsDelivr)

Originally created by @idleberg on GitHub (Feb 4, 2015). Would be nice to have the CSS files hosted on [cdnjs](https://cdnjs.com/) (and [jsDelivr](jsdelivr.com))
Author
Owner

@fieu commented on GitHub (Feb 6, 2015):

I highly agree.

@fieu commented on GitHub (Feb 6, 2015): I highly agree.
Author
Owner

@kristopolous commented on GitHub (Sep 2, 2017):

Alright sure ... I might as well do this. How does one get their stuff on this? I don't see a signup or upload

@kristopolous commented on GitHub (Sep 2, 2017): Alright sure ... I might as well do this. How does one get their stuff on this? I don't see a signup or upload
Author
Owner

@fieu commented on GitHub (Sep 3, 2017):

@kristopolous According to jsDelivr:

// load any GitHub release
https://cdn.jsdelivr.net/gh/user/repo@version/file

// load jQuery v3.2.1
https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/dist/jquery.min.js

// use a version range instead of a specific version
https://cdn.jsdelivr.net/gh/jquery/jquery@3.2/dist/jquery.min.js
https://cdn.jsdelivr.net/gh/jquery/jquery@3/dist/jquery.min.js

// omit the version completely to get the latest one
// you should NOT use this in production
https://cdn.jsdelivr.net/gh/jquery/jquery/dist/jquery.min.js

// add ".min" to any JS/CSS file to get a minified version
// if one doesn't exist, we'll generate it for you
https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/src/core.min.js

// add / at the end to get a directory listing
https://cdn.jsdelivr.net/gh/jquery/jquery/

So you could do:

https://cdn.jsdelivr.net/gh/kristopolous/BOOTSTRA.386@bs3-pre2/v3.3.2/dist/css/bootstrap.css

There's also RawGit.

So

https://raw.githubusercontent.com/kristopolous/BOOTSTRA.386/master/v3.3.2/dist/css/bootstrap.css

Turns into:

https://cdn.rawgit.com/kristopolous/BOOTSTRA.386/master/v3.3.2/dist/css/bootstrap.css

@fieu commented on GitHub (Sep 3, 2017): @kristopolous According to jsDelivr: ``` // load any GitHub release https://cdn.jsdelivr.net/gh/user/repo@version/file // load jQuery v3.2.1 https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/dist/jquery.min.js // use a version range instead of a specific version https://cdn.jsdelivr.net/gh/jquery/jquery@3.2/dist/jquery.min.js https://cdn.jsdelivr.net/gh/jquery/jquery@3/dist/jquery.min.js // omit the version completely to get the latest one // you should NOT use this in production https://cdn.jsdelivr.net/gh/jquery/jquery/dist/jquery.min.js // add ".min" to any JS/CSS file to get a minified version // if one doesn't exist, we'll generate it for you https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/src/core.min.js // add / at the end to get a directory listing https://cdn.jsdelivr.net/gh/jquery/jquery/ ``` So you could do: `https://cdn.jsdelivr.net/gh/kristopolous/BOOTSTRA.386@bs3-pre2/v3.3.2/dist/css/bootstrap.css` There's also [RawGit](https://rawgit.com/). So `https://raw.githubusercontent.com/kristopolous/BOOTSTRA.386/master/v3.3.2/dist/css/bootstrap.css` Turns into: `https://cdn.rawgit.com/kristopolous/BOOTSTRA.386/master/v3.3.2/dist/css/bootstrap.css`
Author
Owner

@extend1994 commented on GitHub (Nov 22, 2017):

Hi everyone! I am a member from cdnjs 😄
There is a corresponding library request opened by @NurdTurd https://github.com/cdnjs/cdnjs/issues/11775 (Thanks for request! 👍 )
I am afraid that cdnjs will need maintainers/authors to release versions with distribution on git repo, npm or other similar public platform. It currently seems like that only zip files with distribution. In this case, I won't be able to add the lib because it doesn't meet library requirement.

For more details, you can refer
https://github.com/cdnjs/cdnjs/blob/master/CONTRIBUTING.md#a-issue
https://github.com/cdnjs/cdnjs/pull/11970#issuecomment-338976531
https://github.com/cdnjs/cdnjs/blob/master/documents/autoupdate.md

@extend1994 commented on GitHub (Nov 22, 2017): Hi everyone! I am a member from cdnjs :smile: There is a corresponding library request opened by @NurdTurd https://github.com/cdnjs/cdnjs/issues/11775 (Thanks for request! :+1: ) I am afraid that cdnjs will need maintainers/authors to release versions with distribution on git repo, npm or other similar public platform. It currently seems like that only zip files with distribution. In this case, I won't be able to add the lib because it doesn't meet library requirement. For more details, you can refer https://github.com/cdnjs/cdnjs/blob/master/CONTRIBUTING.md#a-issue https://github.com/cdnjs/cdnjs/pull/11970#issuecomment-338976531 https://github.com/cdnjs/cdnjs/blob/master/documents/autoupdate.md
Author
Owner

@kristopolous commented on GitHub (Nov 22, 2017):

Can you give me an example, with a URL link, of what you'd like to see, so I know what action to take?Please note this is a CSS bootstrap theme with a bit of javascript, and not a nodejs library. Thanks.On Nov 21, 2017 8:56 PM, LboAnn notifications@github.com wrote:Hi everyone! I am a member from cdnjs 😄
There is a corresponding library request opened by @NurdTurd cdnjs/cdnjs#11775 (Thanks for request! 👍 )
I am afraid that cdnjs will need maintainers/authors to release versions with distribution on git repo, npm or other similar public platform. It currently seems like that only zip files has distribution. In this case, I won't be able to add the lib.
For more details, you can refer
https://github.com/cdnjs/cdnjs/blob/master/CONTRIBUTING.md#a-issue
cdnjs/cdnjs#11970 (comment)
https://github.com/cdnjs/cdnjs/blob/master/documents/autoupdate.md

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

@kristopolous commented on GitHub (Nov 22, 2017): Can you give me an example, with a URL link, of what you'd like to see, so I know what action to take?Please note this is a CSS bootstrap theme with a bit of javascript, and not a nodejs library. Thanks.On Nov 21, 2017 8:56 PM, LboAnn <notifications@github.com> wrote:Hi everyone! I am a member from cdnjs 😄 There is a corresponding library request opened by @NurdTurd cdnjs/cdnjs#11775 (Thanks for request! 👍 ) I am afraid that cdnjs will need maintainers/authors to release versions with distribution on git repo, npm or other similar public platform. It currently seems like that only zip files has distribution. In this case, I won't be able to add the lib. For more details, you can refer https://github.com/cdnjs/cdnjs/blob/master/CONTRIBUTING.md#a-issue cdnjs/cdnjs#11970 (comment) https://github.com/cdnjs/cdnjs/blob/master/documents/autoupdate.md —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@extend1994 commented on GitHub (Nov 24, 2017):

Sorry for late reply here. 😓
@kristopolous Sure I can give an example 😄
This issue https://github.com/yusugomori/csssans/issues/7 asked the author if he can add a tag for versions to let cdnjs be able to fetch the files cdnjs needs automatically (in this case, they are css/js files under src of the project) via a mechanism called "auto-update".

cdnjs hopes to fetch files by setting "auto-update" config. The config needs a project to have a fixed folder for distributions but distinguished by git tags. In your current file structure, distributions are under folders named after versions, which can't be fixed one. If you can use a fixed folder to put files, and add tags for them, it can help us a lot on adding your lib.

@extend1994 commented on GitHub (Nov 24, 2017): Sorry for late reply here. :sweat: @kristopolous Sure I can give an example :smile: This issue https://github.com/yusugomori/csssans/issues/7 asked the author if he can add a tag for versions to let cdnjs be able to fetch the files cdnjs needs automatically (in this case, they are css/js files under `src` of the project) via a mechanism called "auto-update". cdnjs hopes to fetch files by setting "auto-update" config. The config needs a project to have a fixed folder for distributions but distinguished by git tags. In your current file structure, distributions are under folders named after versions, which can't be fixed one. If you can use a fixed folder to put files, and add tags for them, it can help us a lot on adding your lib.
Author
Owner

@nilp0inter commented on GitHub (Aug 22, 2019):

Anything we can do to move this forward?

@nilp0inter commented on GitHub (Aug 22, 2019): Anything we can do to move this forward?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BOOTSTRA.386#39