Open bshambaugh opened 9 years ago
Thanks for the feedback.
Much of this code was a rapid prototype and still needs cleaning up, so I am sure there's quite a few more bugs that need to killed before getting to MVP.
I'm quite new to polymer and bower, so I may not understand fully the distinction. In
https://www.polymer-project.org/0.5/docs/start/getting-the-code.html#using-bower
we have :
"dependencies": {
"polymer": "Polymer/polymer#^0.5"
}
Do you know the differences between that and your suggestion?
It just really bothered me that "polymer": "Polymer/polymer#~0.5.2" is so verbose when something like "angularjs": "~1.4.0" is so concise. The Polymer people used the same syntax. This is new to me.
Here is an IRC chat from today with the alias of the other person changed (if it is of interest):
{bshambaugh} I'm trying to understand bower.json syntax. http://bower.io/docs/creating-packages/ {some_IRC_alias} bshambaugh: It is almost the same as package.json. https://docs.npmjs.com/files/package.json {some_IRC_alias} if that helps {bshambaugh} It seems to. From http://bower.io/docs/creating-packages/ I interpret that dependencies can have values version, folder, or package. From https://docs.npmjs.com/files/package.json and https://github.com/bower/bower.json-spec I interpret that you can specify a folder and a #{version} with ~ allowing you to say "Approximately equivalent to version" and ^ saying "compatible with version" {some_IRC_alias} That must be where the difference lies. {bshambaugh} Hence, "polymer": "Polymer/polymer#~0.5.2", means polymer in the Polymer/polymer folder with a version approximately equal to 0.5.2 Huh? Trying to read this: https://github.com/melvincarvalho/webid.im/blob/master/bower.json {some_IRC_alias} https://github.com/npm/node-semver#tilde-ranges-123-12-1 this will explain the how the versioning is determined. I read that as Polymer (gh-user)/ polymer (repository) Finding the github release tag matching ~0.5.2 The link above explains the ~ part Bower is really just a wrapper around github tags. {bshambaugh} oh? so it is kinda mirroring the github repo? curl http://bower.herokuapp.com/packages/polymer gives me {"name":"polymer","url":"git://github.com/Polymer/polymer.git","hits":26828} It seems redundant to specify polymer as the key and then the folder path before the #{version} e.g. "polymer": "Polymer/polymer#~0.5.2", {some_IRC_alias} polymer as the key should be the name field in the bower.json and the name of the directory in the bower_components directory {bshambaugh} "polymer": "Polymer/polymer#~0.5.2" still eats me though..I see no bower_components directory. I'd write it as "polymer": "~0.5.2" and call it good... {some_IRC_alias} You could use npm then ;) The bower_components directory appears when you do a bower install on the project
Speaking of the bower_components directory, it eats me that in your index.html file you have , for example, <link href="bower_components/core-collapse/core-collapse.html" rel="import">
when core-collapse is not specified in your bower.json file.
Not having installed your application (I'm not experienced enough to know how) but giving an educated guess I'd say that core-collapse must be installed manually rather than allowing bower to fetch it (as I presently understand it). Following the steps for installing Polymer with bower does not by default seem to result in things like core-collapse, paper-icon-button, paper-dropdown, and paper-action-dialog being installed. The other link rel syntax refers to something that is either in your git repository or mentioned by name in the bower.json file in your git repository.
I hope that this is not seen as a problem with the code, but as personal itches that arise when someone not greatly experienced in this realm comes to try to comprehend it. Maybe I'll have a better idea tomorrow. It's getting late here after all.
Thanks for the info. Feel free to pop in to
https://gitter.im/melvincarvalho/webid.im
If you'd like to discuss changing this, in a more realtime environment ...
It makes sense to me that you would specify a folder for things like core-scaffold with the syntax "core-scaffold":"Polymer/core-scaffold#~0.5.2"as in http://bower.io/docs/creating-packages/#bowerjson but why "polymer": "Polymer/polymer#~0.5.2 instead of "polymer":"~0.5.2" ?