Comments (12)
Hi,
It's very unfortunate CDNs don't use the official naming. What if we implemented something to figure out the official name (ie. match libraries based on links) and then rename them all? Then you could use the same name to refer to them.
Also we could do something like a global search to make it easier to figure out where a particular library is available (ie. /v1/libraries?name=ember
). I'm not exactly sure what that would return (array of objects with cdn -> library mapping?). This is a separate issue, though.
from api.
So something like this?
{
"name": "99lime",
"normname": "99lime"
},
{
"name": "accounting.js",
"normname": "accounting"
}
Basically create a parameter normname
where we store the name but without js
and dots. I just think we will run into lots of issue this way. Maybe regex would be a better solution?
from api.
"Official" naming can be tricky, since @jdalton named the repo https://github.com/lodash/lodash & homepage http://lodash.com/ but he will correct people to say "Lo-Dash". I'm the one who setup jsDeliv IIRC & picked the repo name, but not sure who set up CDNJS as lodash.js
So maybe an alias-array? How many lo-dash
searches do you get at www.jsdelivr.com/?
I was going to compare the repositories
field since (aside from moving the project) they should be the same, but you guys didn't grab that field from cdnjs :`(
Basically create a parameter normname where we store the name but without js and dots
That could work. You'll need to remove or transform+?wildcard all dashes & dots also, eg:
http://api.jsdelivr.com/v1/cdnjs/libraries?name=jquery-scrollTo
http://api.jsdelivr.com/v1/jsdelivr/libraries?name=jquery.scrollTo
If so, would the default for searches would have to be on normname
, unless ?name=
is used?
from api.
I think we can add the missing repository parameter to cdnjs. That would help a lot I think.
But I really dislike the idea of normalized names. For example jsDelivr can have a project named as jquery.pluginName but cdnjs just pluginName.
from api.
add the missing repository parameter to cdnjs
Thanks! BTW, what happens if the repo is not on github, since jsDelivr doesn't (seem to) encourage other repos? Not too many don't use github, 1-2% when I checked last summer, but may change in future. Eg CDNJS:
"repositories": [{
"type": "svn",
"url": "http://google-diff-match-patch.googlecode.com/svn/trunk/"
}],
I really dislike the idea of normalized names. For example jsDelivr can have a project named as jquery.pluginName but cdnjs just pluginName
Good point, may get worse as there are more plugins for Angular, React, etc
from api.
jsDelivr does not require for the project to be on Github. You can simply leave that parameter empty if the project is hosted elsewhere.
from api.
Maybe the bower component name can be used as the 'official name'.
It would be extremely helpful to me if I could query using the bower name.
from api.
@shahata That could be nice pick for number one name. If that's missing maybe go with NPM, then / (GitHub), then current name? Issue #13 discusses this approach.
from api.
A good search index implementation should handle this.
from api.
@GeorgeErickson yes @bebraw wrote one that weighs exact match well. Perhaps there should be some fuzzy searching, dropping any - | _ | . | .js | .css
.
from api.
from api.
from api.
Related Issues (20)
- Version sorting HOT 10
- API returns no versions (urgent) HOT 5
- Move the API away from AppFog HOT 8
- Am I right to assume that I cannot get data for multiple librarys with one api call? HOT 4
- Searching by URL HOT 1
- jQuery failed to update latest beta1 HOT 2
- File paths HOT 14
- Incorrect author format for some CDNJS projects HOT 3
- pagination need? HOT 3
- The result order is not right HOT 3
- Default filename for specified version HOT 8
- API is not detecting new projects HOT 2
- Specify Content Security Policy? HOT 1
- API future HOT 3
- Add SRI to API HOT 1
- Add a download/hit count to the API HOT 7
- API endpoint down? HOT 2
- "bootstrap" alias is gone in v1 HOT 7
- Remove X-Requested-With
- Make sure logentries is utilized HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.