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

cdnjs #39

Open
idleberg opened this issue Feb 4, 2015 · 7 comments
Open

cdnjs #39

idleberg opened this issue Feb 4, 2015 · 7 comments

Comments

@idleberg
Copy link

idleberg commented Feb 4, 2015

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

@fieu
Copy link

fieu commented Feb 6, 2015

I highly agree.

@kristopolous
Copy link
Owner

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

@fieu
Copy link

fieu commented 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/[email protected]/dist/jquery.min.js

// use a version range instead of a specific version
https://cdn.jsdelivr.net/gh/jquery/[email protected]/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/[email protected]/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

@extend1994
Copy link

extend1994 commented Nov 22, 2017

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 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
cdnjs/cdnjs#11970 (comment)
https://github.com/cdnjs/cdnjs/blob/master/documents/autoupdate.md

@kristopolous
Copy link
Owner

kristopolous commented Nov 22, 2017 via email

@extend1994
Copy link

Sorry for late reply here. 😓
@kristopolous Sure I can give an example 😄
This issue yusugomori/csssans#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.

@nilp0inter
Copy link

Anything we can do to move this forward?

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

5 participants