Code Monkey home page Code Monkey logo

api's Introduction

jsDelivr - Open Source CDN

jsdelivr-logo
A global super-fast and production-focused CDN, tightly integrated with NPM and GitHub
with support for on-the-fly optimizations, ES modules, detailed download stats and more

www.jsdelivr.com

Website Repo · Public API · Blog · @jsDelivr · Discord


We are looking for contributors. Please check open issues in the above repos if you think you could help, or open a new one if you have an idea you'd like to discuss.

jsDelivr is a free CDN for open-source files. We are tightly integrated with Github and npm, allowing us to automatically provide a reliable CDN service to almost every open-source project out there.

We offer a stable CDN that can be used in production on popular websites with huge amounts of traffic. There are no bandwidth limits or premium features, and it's completely free to use.

Why jsDelivr?

Ready for production

Our public CDN is built to be used in production by even the largest websites. Everything is optimized and constantly improved to offer all users maximum speed and uptime. Performance is monitored at all times, and we are always looking into new technologies and providers that may further improve our CDN. Downtime, timeouts, or slow responses are simply unacceptable.

We do everything possible to ensure our CDN will NEVER break any websites, regardless of the use case. If a file is available via our CDN, we assume it's used in production and ensure it will continue to work no matter what.

This includes dynamic endpoints such as /npm/, /gh/ and /combine/. When a file is first accessed, it gets permanently stored in a reliable file system. This means that even if a npm package gets deleted or an existing file gets removed by a developer, jsDelivr will continue to serve the stored copy forever without breaking any websites or causing any issues.

On top of that, we also do version fallback. This means that if a file used in version 1.0.1 is no longer available in 1.0.2 and a user requests the non-existent file, we will fall back to the previous 1.0.1 version and serve it instead of failing with a 404 error.

Multi-CDN

Unlike the competition, jsDelivr uses multiple CDN providers, resulting in the best possible uptime and performance. We currently use CloudFlare, and Fastly.

If a CDN goes down, websites that use jsDelivr won't have any issues because all traffic will be instantly redirected to remaining operational providers.

Smart Load Balancing

jsDelivr uses real user performance data (also known as RUM) to make its routing decisions. These metrics are gathered from hundreds of websites and are used in our load-balancing algorithm to make accurate decisions for serving content.

All providers (CDNs and custom servers) are tested millions of times per day by real users from all over the world. Based on this information, jsDelivr knows what provider is the fastest for each user. Each user gets a unique response based on his or her location, ISP, and the providers' uptime in real-time.

This system also responds immediately to performance degradation and downtime of providers. If a CDN is under a DDoS attack, and its performance drops in some locations, in a matter of seconds, the algorithm will pick up the change and start serving a different provider to all affected users.

Failover

We have multiple layers of failover to protect our users from any downtime.

We use 2 DNS providers at the same time. For jsDelivr to go down, both of these companies would have to go down at the same time.

Both of our DNS providers monitor our load-balanced endpoint, and if they detect problems, they will automatically switch all traffic to a single CDN provider.

Our load balancer monitors the uptime of all CDN providers using both RUM and synthetic data. If any of those detect downtime or performance degradation, that CDN provider will be removed immediately without any impact on our users.

Our origin consists of multiple servers in different data centers. If a server goes down, the CDNs will automatically switch to using the remaining healthy servers.

In total, we have one of the most resilient systems out there, ready to be used in production by even the biggest companies.

China

jsDelivr has multiple locations close to Chinese urban centers to ensure low latency and high performance for all Chinese users.

Usage Documentation

jsDelivr provides mirrors for npm, GitHub, WordPress plugins, and custom endpoints for several other projects with special requirements. If our regular endpoints don't work for your use case, let us know and we'll figure something out!

If you are a package author, check our tips for package authors to make using your package as easy as possible.

Root endpoint is always https://cdn.jsdelivr.net

npm

jsDelivr can instantly serve any file from any npm package in the public registry. New versions pushed to npm are instantly available via our CDN as well. No maintenance is required.

If a package, version, or file gets removed from npm, then jsDelivr will continue to serve that file from our permanent storage without breaking any websites using it.

We use a permanent S3 storage to ensure all files remain available even if npm goes down or a package is deleted by its author. Files are fetched directly from npm only the first time or when S3 goes down.

Load any project hosted on npm:
/npm/package@version/file
Load exact version:
/npm/[email protected]/dist/jquery.min.js
Use a version range instead of an exact version:
/npm/jquery@3/dist/jquery.min.js
/npm/[email protected]/dist/jquery.min.js

NOTE

If you use this feature and a file you requested is not available in the newest version of the package, the link will keep working thanks to our version-fallback feature. We'll continue to serve the file from the older version of the package instead of failing with a 404 error.


Load by tag (Not recommended for production usage):
/npm/jquery@beta/dist/jquery.min.js
Omit the version completely or use "latest" to load the latest one (not recommended for production usage):
/npm/jquery@latest/dist/jquery.min.js
/npm/jquery/dist/jquery.min.js

NOTE Requesting the latest version (as opposed to "latest major" or "latest minor") is dangerous because major versions usually come with breaking changes. Only do this if you really know what you are doing.


Add ".min" to any JS/CSS/SVG file to get a minified version - if one doesn't exist, we'll generate it for you. All generated files come with source maps and can be easily used during development:
/npm/[email protected]/github-markdown.min.css

NOTE Minifying a large file can take several seconds. However, we store all generated files in our permanent storage, so this delay only applies to the first few requests.


Omit the file path to get the default file. This file is always minified:
/npm/[email protected]
/npm/jquery@3
/npm/jquery
Get a directory listing:

GitHub

We recommend using npm for projects that support it for better UX - npm packages are searchable on our website, and package pages show additional useful information, such as descriptions and links to homepages.

We use a permanent S3 storage to ensure all files remain available even if GitHub goes down or a repository or a release is deleted by its author. Files are fetched directly from GitHub only the first time or when S3 goes down.

Load any GitHub release, commit, or branch:
/gh/user/repo@version/file
Load exact version:
/gh/jquery/[email protected]/dist/jquery.min.js
/gh/jquery/jquery@32b00373b3f42e5cdcb709df53f3b08b7184a944/dist/jquery.min.js
Use a version range instead of an exact version (only works with valid semver versions):
/gh/jquery/jquery@3/dist/jquery.min.js
/gh/jquery/[email protected]/dist/jquery.min.js

NOTE If you use this feature and a file you requested is not available in the newest release, the link will keep working thanks to our version-fallback feature. We'll continue to serve the file from older release instead of failing with a 404 error.


Omit the version completely or use "latest" to load the latest one (only works with valid semver versions): (not recommended for production usage)

Falls back to the master branch if there are no tagged releases.

/gh/jquery/jquery@latest/dist/jquery.min.js
/gh/jquery/jquery/dist/jquery.min.js

NOTE Requesting the latest version (as opposed to "latest major" or "latest minor") is dangerous because major versions usually come with breaking changes. Only do this if you really know what you are doing.


Add ".min" to any JS/CSS/SVG file to get a minified version - if one doesn't exist, we'll generate it for you. All generated files come with source maps and can be easily used during development:
/gh/jquery/[email protected]/src/core.min.js

NOTE Minifying a large file can take several seconds. However, we store all generated files in our permanent storage, so this delay only applies to the first few requests.


Get a directory listing:
/gh/jquery/[email protected]/
/gh/jquery/[email protected]/dist/

Combine multiple files

Our combine endpoint allows you to load several files from npm and GitHub endpoints in one request:

/combine/url1,url2,url3

All features that work for individual files (version ranges, minification, main modules) work here as well. All combined files come with source maps and can be easily used during development.

Examples:

/combine/gh/jquery/[email protected]/dist/jquery.min.js,gh/twbs/[email protected]/dist/js/bootstrap.min.js
/combine/npm/[email protected]/dist/css/bootstrap.min.css,npm/[email protected]/dist/css/bootstrap-theme.min.css

NOTE Combining large/many files can take several seconds. However, we store all generated files in our permanent storage, so this delay only applies to the first few requests.


Publishing packages

All packages hosted on npm and tagged releases on GitHub are automatically available on jsDelivr. If you are a package author, here are a few tips to make using your package as easy as possible:

  • Use semver for versioning (this is enforced by npm but not by GitHub)
  • If a file listed as main in package.json isn't meant to be used in a browser, set a browser or jsdelivr field
  • If you distribute minified JS/CSS files, also include source maps for those files
  • If you don't want to provide minified files, it's fine - we'll handle that for you

Configuring a default file in package.json

For packages hosted on npm, we support serving "default" files with shorter URLs. The default file can be configured by setting one of the following fields in package.json, with jsdelivr having the highest priority:

  1. jsdelivr
  2. browser
  3. main

We will first attempt to locate a minified version of the file provided here (by removing the extension and looking for the same file .min.js). If we can't find one, we will minify ourselves.

Be advised that you must include the file extension in the values, for example:

"main": "./index" // this will NOT work
"main": "./index.js" // this is the correct way

For projects having both a JS and a CSS file, use one the above fields for JS and a style field for the CSS file (example).

Restrictions

  • Packages larger than 150 MB or single files larger than 20 MB (in the case of GitHub) are not supported by default. We recommend removing files that are not needed from your package when possible. If you need to set a higher limit for your package, open an issue in this repo.
  • HTML files are served with Content-Type: text/plain for security reasons.

WordPress

Our WordPress endpoint works for plugins and themes hosted in the WordPress.org plugin directory and Wordpress.org theme directory, and mirrors the WordPress.org plugins SVN repo.

Load any plugin from the WordPress.org plugins SVN repo:
/wp/project/tags/version/file
Load exact version:
/wp/wp-slimstat/tags/4.6.5/wp-slimstat.js
Load the latest version (not recommended for production usage):
/wp/wp-slimstat/trunk/wp-slimstat.js
Load any theme from the WordPress.org themes SVN repo:
https://cdn.jsdelivr.net/wp/themes/project/version/file
Load an exact version of a file:
https://cdn.jsdelivr.net/wp/themes/twenty-eightteen/1.7/assets/js/html5.js
Add ".min" to any JS/CSS file to get a minified version - if one doesn't exist, we'll generate it for you. All generated files come with source maps and can be easily used during development:
https://cdn.jsdelivr.net/wp/themes/twenty-eightteen/1.7/assets/js/html5.min.js

Caching

Our caching logic and headers are optimized for production use and apply to all non-custom endpoints.

  • Static Versions and commit hashes - Effectively forever. The caching headers are set for 1 year but we also permanently cache the files in our S3 storage. So all future requests that bypass the CDN will hit our S3 storage with no option or way to update the contents of that file.
  • Version aliasing - 7 days. This also includes latest versions. They are cached on our CDN for 7 days with the option to purge the cache using our API to speed up the release of your project to your users.
  • Branches - 12 hours.

In certain cases, purgeable files can get updated faster due to low-cache hit ratio or forced CDN purge from our side for maintenance reasons.

We use permanent S3 caching even with dynamic URLs, such as version aliasing, meaning once we download your tagged files, there is no way for you to update them. If there is a critical issue in your latest release the best course of action is to tag a new semver valid release with the fix and purge the CDN URLs using our purge API.

Purge cache

jsDelivr has an easy-to-use API to purge files from the cache and force the files to update. This is useful when you release a new version and want to force the update of all version-aliased users.

Please note:

  • It will not work for static files as explained above.
  • Valid semver releases must be used for purge to work
  • Rate-limiting applies to all users

To avoid abuse, access to purge is given after an email request (for now - [email protected]).

Custom CDN Hosting

We can work together and set up a custom configuration for your project. This way, you can have full control over your files and the ability to utilize the full power of jsDelivr.

This kind of custom hosting can be suitable for:

  • Binary hosting. Windows executable files and zips.
  • Frequently updated files.
  • Projects that can't follow jsDelivr file structure.
  • Some other use that will blow all of our minds.

Simply send an email to [email protected] with a request for more information.

Current OSS projects using custom configs:

Privacy Policy

cdn.jsdelivr.net

jsDelivr might use information about downloaded files to build download stats per project and per file.

jsDelivr does not store any user data and does not track any users in any way.

Here are the relevant policies of our CDN providers:

api's People

Contributors

bebraw avatar gavinhungry avatar jimaek avatar martinkolarik avatar megawac avatar tombyrer avatar unboundev avatar yasuyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api's Issues

Ability to search by using logical OR connective

As I understand, currently AND connective/operator is used when search is made with two or more parameters.
Is it possible to add support for OR connective someway?
So that for example search for name=*key*&description=*key* would return list with packages whose name or description contains specified key.

Confirm sources

Can you please confirm where data is coming from for this service. Are you a primary authority for the package list of any of the CDN?

Thank you

handlebarsjs doesn't work via compiled request

Loving jsDelivr, and I'm switching over all the CDN requests on one of my apps to use it today. HandlebarsJS works great if I request it individually, like so:

<script src="//cdn.jsdelivr.net/handlebarsjs/1.3.0/handlebars.min.js"></script>

However, as soon as I add it to a compiled request, handlebars stops working. Even if I request it as the only member of a compilation, like so:

<script src="//cdn.jsdelivr.net/g/[email protected]"></script>

Doing so results in this error everywhere I call handlebars:

TypeError: Handlebars.compile is not a function

The compiled request for the 5 other libraries I use is working great, so I'm not sure why Handlebars would be failing.

http://api.jsdelivr.com/v1/best

Daily/Hourly data from CDNperf

  • master index of files on all CDNs
  • jsdelivr's load-balancing closest-POP scripting wizardry (I assume you do this already for //cdn.jsdelivr.net/)
    = a CDN API that kicks... can I say arce on here? ;)

Plus, this may help adding new POPs; being able to use all the CDNs with one link is close to combining them all into one CDN, isn't it?

Support searching against arrays

Ie. http://api.jsdelivr.com/v1/jsdelivr/libraries?versions=2.1.1 or http://api.jsdelivr.com/v1/jsdelivr/libraries?versions=2.1.*.

This will become particularly useful if keywords are added to the API (#37).

FYI: other CDN APIs

phuu / cdnjs
BTW, cdnjs cleanly lists non-GitHub source code repositories; there are only a few, but some still use Google-code, host their own repo on a non-homepage, & 2 others repos.
passy / google-cdn

Could be good starting points.

How to parse results?

Hi there,

Noob question. I'm about to do some googling, but what's the best method you recommend to parse the results for PHP as an array?

Thanks :)

Prune `/libraries` out of urls?

I wonder if we should just drop libraries from url. That's the only resource type we serve so now it seems redundant. We could do this change in v2.

Confirm recency

The index file http://api.jsdelivr.com/v1/jsdelivr/ shows all included CDNs.

I would like to ask that here or some other location will explicitly state that date the the data files were last updated.

URL: SemVer API matching & shorten API path

API idea looks great!

Idea:

  1. Please use full Semantic Versioning for the API version. EG first released version will be v1.0.0
  2. Use shortened alias URL for latest sub-version:
    • Newest v1.0.* will be accessed as only /v1.0/. This is perfect for most API calls, since API bug fixes will automatically be implemented with no user code changes, but code will not be negatively affected by non-compatible API removals or drastic updates.
    • Latest v1.. = /v1/
    • Newest version = / (version 'folder' is dropped;prefered) or // or /v/ ... for those who are lazy or like to live dangerously ;)

Minor idea:
Shorten the URL, dropping the v, & maybe abbreviate libraries so this will return the latest jquery lib using the newest bugfixed 1.0.* API:
http://api.jsdelivr.com/1.0/jsdelivr/lib?name=jquery
Faster to type & slightly easier to remember IMHO. And just think of all the coffees you can buy from the saved bandwidth ;)

requests for .map throws 404 if the original library is in a grouped request

We just discovered this because Underscore is one of the libraries we use. If I request Underscore on its own, like so:

<script src="//cdn.jsdelivr.net/underscorejs/1.6.0/underscore-min.js"></script>

Then Chrome dev tools sees that there's a .map file, and requests it automatically from:

//cdn.jsdelivr.net/underscorejs/1.6.0/underscore-min.map

However, if we include Underscore in a grouped request:

<script src="//cdn.jsdelivr.net/g/[email protected],[email protected],[email protected],[email protected],[email protected],[email protected](handlebars.min.js)"></script>

Chrome attempts to find the .map file in the same directory, which in this case will 404:

//cdn.jsdelivr.net/g/underscore-min.map

This doesn't break the public-facing site, of course, so it's not a critical issue. I'm not sure what the best way to fix it would be. The Underscore javascript includes a line like:

//# sourceMappingURL=underscore-min.map

Which is obviously telling dev tools where to go looking for the .map file. Not sure if it's easiest to change that, or to add some logic to the /g/ grouping somehow.

Search for lib API

I had a request to add jsdelivr to my Alfred CDN workflow (willfarrell/alfred-cdn-workflow#2). The other CDNs have a json file for everything or their search page isn't dynamically generated (thus I scrape). What is the best way to get all the libs on your cdn for fast local search?

API down

Got AppFog 404.
I hope I didn't break it with my script demos!

jsdelivr api's down

Hi the api is down (404) (4:28 GMT+1) , not the first time , maybe you should had a status check system ( and a status page ) for the next version

A couple of notices about README.md

Hello,

  1. There is a typo in README.md:

    a comma for seperation

  2. Why is description not mentioned in list of parameters that can be used for search?
    Search by description works fine.

Add `/libraries`

It would be potentially interesting to add a library oriented resource. Example:

GET /v2/libraries?normname=jquery/jquery (need to use a normalized name here to avoid name clashes (just see all color libs))

[
    {
        "normname": "jquery/jquery",
        "_id": "ey8mGL8Bp7q",
        "created": "2014-02-25T08:48:09.270Z",
        "description": "jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.",
        "homepage": "http://jquery.com/",
        "github": "https://github.com/jquery/jquery",
        "author": "jQuery Foundation",
        "cdns": {
            "jsdelivr": {
                "name": "jquery",
                "mainfile": "jquery.min.js",
                "zip": "jquery.zip",
                "lastversion": "2.1.0",
                "versions": [
                    "2.1.0",
                    "2.0.3",
                    "2.0.2",
                    "2.0.1",
                    "2.0.0",
                    "1.11.0",
                    "1.10.2",
                    "1.10.1",
                    "1.10.0",
                    "1.9.1",
                    "1.9.0",
                    "1.8.3",
                    "1.7",
                    "1.4.4"
                ],
                "assets": [
                    {
                        "version": "2.1.0",
                        "files": [
                            "jquery.js",
                            "jquery.min.js",
                            "jquery.min.map"
                        ]
                    },
                    ...
                ]
            },
            "cdnjs": {...},
            "google": {...}
        }
    }
]

This simply aggregates the current information in a different format. In the beginning you can see common meta (name, description etc.). CDN specific information is stored to cdns.

Possible additional benefit of the scheme is that it would allow us to aggregate libraries not available in any CDNs yet to the index.

Add `repositories` field

Standardize with NPM format. Ie.

"repositories": [
    {
        "type": "git",
        "url": "https://github.com/medialize/URI.js"
    }
],

Add SSL/TLS support

api.jsdelivr.com is currently only served in the clear, which creates mixed-content warnings when an SSL/TLS page requests content from it.

Any plans to add SSL/TLS to this server? (not a huge problem if not, I can always proxy or self-host).

search by 'file grouping'?

While most of the files on CDNs are JS & their supporting CSS files, I do look at jsDelivr on occasion for fonts. However, a font might not be called a font, such as ratchicons. Searching by the file extensions .eot|.ttf|.woff could be helpful, searching for .svg that is a font is problematic. & fonts are sometimes on CDNs as part of larger distro, like Bootstrap & Ratchet, so they are only a sub-folder, not the main distro. Ideas:

  • do nothing (could be a pain for you guys; someone else can make a linkfarm of fonts on CDNs)
  • have a separate directory/API for fonts
  • make separate repos with just the font
    • all named font-FONTNAME
    • Description must have the keyword font & allow the API have description=*font*
    • have a 'keywords' field, & if the repo is a font, it can be listed there

Just a thought, incase you wanted to allow someone to make a fonts directory easier.
Likely a v2/v3 thing.

How to find same project, different CDN, different "name" field?

How can I find just the Ember CDN, if:

http://api.jsdelivr.com/v1/cdnjs/libraries?name=lodash*&fields=name
[{"name": "lodash.js"}]
http://api.jsdelivr.com/v1/jsdelivr/libraries?name=lodash*&fields=name
[{"name": "lodash"}]
http://api.jsdelivr.com/v1/cdnjs/libraries?name=ember*&fields=name
[{"name":"ember-data-django-rest-adapter"},{"name":"ember-data.js"},{"name":"ember-resource.js"},{"name":"ember.js"}]
http://api.jsdelivr.com/v1/jsdelivr/libraries?name=ember*&fields=name
[{"name":"ember.localstorage-adapter"},{"name":"ember.table"},{"name":"emberjs"}]

There are other mismatched project names: underscore.js|underscorejs, can.js|canjs, hard to say how many now or in future. Not sure of the best approach?

  • client-side or server-side lookup table (might grow large)
  • switching to RegEx, since I can't figure out how to use minimatch here. In RegEx, I think all of the above files would be isolated via NAME.?(js)?, right?

thanks :)

Add github stars

Having an occasionally updated number of stars on github for the project would be awesome for search.

Add `normname` field

Now it's very difficult to find the same library across different CDNs. In order to solve this I propose adding normname (stands for normalized name) field. For GitHub projects, it's /. If GitHub link is not available, project name is used instead.

Add MaxCDN's Bootstrap CDN

Please add support for MaxCDN's BootstrapCDN.

Code for extracting the latest versions and URLs from MaxCDN are provided at:
https://github.com/fulldecent/web-puc

Please run the command web-puc -u to have the that data extracted.

P.S. I intend to integrate this jsdelivr API into web-puc.

Allow to hide projects per CDN

For example for jsDelivr we want to hide highstocks and some other projects.
Maybe a config file where we can set a list of project names we want to hide from each CDN we support?

(fuzzy) search by field

The field searching is very useful, thanks! But it is too literal.
http://api.jsdelivr.com/v1/jsdelivr/libraries?author=angularui gives one result
http://api.jsdelivr.com/v1/jsdelivr/libraries?author=AngularUI gives another
http://api.jsdelivr.com/v1/jsdelivr/libraries?author=%22AngularUI%22 does not work, so 'AngularUI Team' or can never be found. (Many people use their full name at author).

  1. Could you please allow quoting?
  2. I hope there is a wildcard search that will find both lower & uppercase variants, along with partial matches. But I am not certain how to suggest wildcard searching:
    • all inquiries will be assumed wildcard search, with a flag to turn on literal matching
    • if entered lowercase then wildcard, if mixed case then literal match
    • other way to turn on wildcard (GET parameter, quoting...)?

Explicit documentation of asset URLs

Please consider:

http://api.jsdelivr.com/v1/bootstrap/libraries?name=*bootstrap

The result shows project name is twitter-bootstrap, version is 3.2.0 and one asset is css/bootstrap.min.css. However, the actual asset hosted on the CDN is located at this scheme-relative URL:

//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css

Please provide a reliable and documented way for API users to determine the full scheme-relative CDN asset URL with the returned information. Presently it is necessary to know the CDN's base URL and, in this case, the canonical name for twitter-bootstrap.

bootstrap/bootstrap Update project name to match URL part

Please update

http://api.jsdelivr.com/v1/bootstrap/libraries?name=*bootstrap

Which name is currently twitter-bootstrap to instead be bootstrap. This is more consistent to the asset URLs which are used, which include for example:

//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css

With information from #48, a linter can quickly for further inconsistencies in project names.

SemVer sorting, reversed prefered

    "name": "jquery",
    "versions": [
      "2.1.0",
      "2.0.3",
      "2.0.2",
      "2.0.1",
      "2.0.0",
      "1.9.1",
      "1.9.0",
      "1.8.3",
      "1.7",
      "1.4.4",
      "1.11.0",  // 1.11 > 1.9  :(
      "1.10.2",
      "1.10.1",
      "1.10.0"

I hope to be:

    "name": "jquery",
    "versions": [
      "2.1.0",
      "2.0.3",
      "2.0.2",
      "2.0.1",
      "2.0.0",
      "1.11.0",
      "1.10.2",
      "1.10.1",
      "1.10.0",
      "1.9.1",
      "1.9.0",
      "1.8.3",
      "1.7",
      "1.4.4"

Perhaps this guy can help out? ;)
TIA

Reformat `assets`

Rather than returning

"assets": [
  {
    "version": "2.1.0",
    "files": [
      "jquery.js",
      "jquery.min.js",
      "jquery.min.map"
    ]
  },
  ...

it would be convenient to return

"assets": {
  "2.1.0":  [
      "jquery.js",
      "jquery.min.js",
      "jquery.min.map"
    ],
...

That way lastversion and versions would work well with the structure.

Runscope feedback

We've uncovered two issues that were causing the behavior you were seeing. The first is >that the server would not accept querystring parameters in a different order, and our retry >client did not guarantee a particular ordering for querystring parameters. The second is >that the server would not accept the percent-encoded value for the comma character >(%2C) in one of the parameters.

Incorrect .woff font path in v 4.2.0

The .woff font path included in the minified stylesheet for v 4.2.0 is incorrect, which is causing failures on TONS of sites that are using it.

The path is:

url('//oss.maxcdn.com/fontawesome/4.2.0/sfonts/fontawesome-webfont.woff?v=4.2.0')

Notice the /sfonts/ part. This should be /fonts/. The original Github and MaxCDN versions of this seems to be correct, but for some reason the jsDelivr version is not. Would love to see this fixed ASAP. Thanks.

Add keywords

Support for keywords/tags in the info.ini would be potentially interesting and a reasonable solution (imo) for package aliasing (jsdelivr/jsdelivr#731)

The way I'd imagine it, assuming we want to continue using .ini files in v2 is a comma seperated list of tags for querying. Poor example below for ace

author = "Ajax.org B.V."
github = "https://github.com/ajaxorg/ace"
homepage = "http://ace.ajax.org/"
description = "Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for Cloud9 IDE and the successor of the Mozilla Skywriter (Bespin) Project."
mainfile = "min/ace.js"
keywords = "wysiwyg,editor,ide"

Drop `lastversion`?

Given it's easy to figure out the last version based on versions what if we just dropped it in v2? Any objections?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.