Open sheerun opened 10 years ago
I think branch
field of an asset
should also be supported:
asset 'foo', github: 'bar/foo', branch: 'baz'
Of course. The branch
needs to be supported for all version control resources. branch
can mean:
Agree with interpreting Bowerfile
content to Hash
. Also I think that we should be able to generate bower.json
within BowerfileInterpreter
class, not LockfileGenerator
, as it's more related to interpreting rather than lockfile generating (just opinion).
Here's our brief for normalized hash format
Not sure about require
and path
.
Do we need source
method? For example, we can support Component but do we really need that right now?
Can branch
mean commit and tag (tags can be identical with branches sometimes)? Bundler has three separate keys (ref
, tag
and branch
) for this purposes, so, I think, we should too.
Another option is BowerjsonGenerator
;)
How about adding groups
array to each asset instead?
I thought source
means bower registry url (registry [object string] in this document.
I didn't know bundler supports three kind of keys. It's fine for me.
I though about svn
support, and I don't think it's necessary.
It adds more external dependencies and nobody actually uses it in bower.
Also git prevents by default using the same name for tag and branch. I don't think it will be a problem.
We can use git rev-parse
to resolve any reference.
Bower doesn't distinguish between tags/branches/commits. I uses just #something
format.
I think normalized hash should normalize branch, ref, etc. to source
field for example.
I think it's good github
is normalized to git
entry.
It's worth noticing bower speeds up downloads from github by using archive files that are attached to some tags (https://github.com/bower/bower/blob/master/lib/core/resolvers/GitHubResolver.js#L53).
How about adding groups array to each asset instead?
Less nesting within hash, much better, I think.
I think normalized hash should normalize branch, ref, etc. to source field for example.
Agree. Less is more. It's pretty enough to work with the repository.
What is the context you want to use git rev-parse
?
We can probably re-use
bower-rails
orbundler
code. Here is sample Bowerfile:I think code above should be evaluated into simple
Hash
, not a class.The output of this task is class in format:
Questions: