Mohammad
Mohammad

Reputation: 209

Why bower install polymer with "Polymer/" prefix and version number?

The Polymer Doc suggests to install polymer with:

bower install --save Polymer/polymer#^1.0.0

Why not just this:

bower install --save polymer

Upvotes: 0

Views: 131

Answers (3)

framled
framled

Reputation: 418

The number next to the element is just a version... If your app works with a specific version you can specified like that

Upvotes: 0

Kayce Basques
Kayce Basques

Reputation: 25907

#^1.0.0 instructs Bower to install the latest 1.x.x version of Polymer that doesn't increment the first non-zero leftmost number, so anything between 1.0.0 but below 2.0.0 exclusive (thanks to zerodevx for correction). If you omit that and just run bower install --save Polymer/polymer it will install the latest and greatest version.

The Polymer/polymer command instructs Bower to go to GitHub and install from the source code repository. You could potentially use the shorthand polymer by itself, if the Polymer team has officially registered with Bower (I'm not sure). To be safe, just go directly to the source and install via Polymer/polymer.

I don't think there is a reason to install 1.0.0 specifically. You should install the latest and greatest. So it's just a documentation error. I'll create a pull request to change the documentation.

Upvotes: 1

Louie Caponi
Louie Caponi

Reputation: 1

Just a difference in what gets downloaded. The former, adds an extra folder, "core-component-page". Try it yourself ;-)

Upvotes: 0

Related Questions