componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 306 forks source link

can't install components which has no component.json in the master branch #611

Closed timaschew closed 9 years ago

timaschew commented 9 years ago

It's kind of opposite of #602 If you only have the component.json in a different branch than master then component install doesn't work, example: https://github.com/timaschew/vexflow

Component should check all available semantic versions first, then install the latest or the given version.

timaschew commented 9 years ago

It's the wrong order, see DEBUG:

remotes:github GET "https://raw.githubusercontent.com/component/emitter/master/component.json"
remotes:github GET "https://api.github.com/repos/component/emitter/tags"
netpoetica commented 9 years ago

Do you mean that if there is no component.json in master, we should checkout and look through all branches until we find the first branch that has one, and then use that component.json and install from master?

timaschew commented 9 years ago

I mean we can fetch all tags for a repo (one request), then sort them and use the latest tag to check if there is a component json. If the latest tag doesn't contain a component.json then we don't check all other tags, instead we check the master branch (second request in this worst case).