componentjs / spec

Component specs
34 stars 4 forks source link

repository, or owner #42

Closed ianstormtaylor closed 10 years ago

ianstormtaylor commented 10 years ago

just a thought, the abbrev of repo seems unnecessary. repository would be nicer

actually, bigger picture, would it be better to just have an owner field instead of the duplication:

{
  "owner": "component",
  "name": "tip"
}
jonathanong commented 10 years ago

+1

@visionmedia how were you planning on handling other sites like bit bucket?

jonathanong commented 10 years ago

we shoudl also have a host flag or something defaulting to github. github: would be okay, but something like host: 'github' or host: 'github.com' would be good too

jonathanong commented 10 years ago

Does this sound okay to you guys?

cristiandouce commented 10 years ago

What's the deal with host? I mean... for what exactly would it be used for (and how)? Lookup or just meta data?

jonathanong commented 10 years ago

If we ever support bit bucket, etc. we can scrape it for now

ianstormtaylor commented 10 years ago

i think i'd be down to just go with repository and name to keep the transition simpler and mimic npm for everyone who knows it. we could then have "smart" expansions for repository to keep ourselves sane (unlike npm) so that component/dom works as expected and defaults to github?

@jonathanong what do you think of that?

basically it amounts to switching to the non abbreviated version and then just "specing" the acknowledgement that it expands to a git://github.com/REPO.git url internally

cristiandouce commented 10 years ago

I know. But let's say I have dependencies in a local component.json from both github and bitbucket. What I don't get is how would host key help resolve to install from github component/dom and from bitbucket cristiandouce/some-component ?

jonathanong commented 10 years ago

repository and name to keep the transition simpler and mimic npm

yup i think i agree.

@cristiandouce i think it's more for discovery and such. right now, you would do remotes: ['github', 'bitbucket'] and it would search github, then bitbucket for every single dep.

tj commented 10 years ago

if we eventually support other end-points it probably makes more sense to start doing Go-style deps with the hostname included (even though it's ugly)

jonathanong commented 10 years ago

is that full URLs? github.com/component/emitter?

i was thinking of a shortcut like github://component/emitter or something

tj commented 10 years ago

The cleanest would be if you could do github.com/component/emitter and there was a link rel= tarball link or something, that would be cool haha but since that will never happen and each needs magical support the scheme thing could work, and foo/bar could just remain as our opinionated GH thing