cannot find paper-button.html - polymer

I'm new with Polymer. Doing this tutorial: https://auth0.com/blog/build-your-first-app-with-polymer-and-web-components/
My problem is my project cannot find the file http://127.0.0.1:8081/bower_components/paper-button/paper-button.html
I did installed it with bower:
bower install PolymerElements/paper-button --save
And the directory is created, but there is no .html file in it.
So when I try to include it in my component
<link rel="import" href="../bower_components/paper-button/paper-button.html">
I get a 404

The latest versions of the PolymerElements on bower are actually es module versions.
To get the Polymer 2 / HTML Import versions, install
PolymerElements/paper-button#^2.1.3

Related

polymer automatic includes of components after bower install

I would like to know if there is a way of automatically include the components after installing them with bower. Or better: automatic include and install after just writing <app-header></app-header> like Eclipse does it for you.
like: bower install --save PolymerElements/app-layout
and after that get
<link rel="import" href="../../bower_components/app-layout/app-header/app-header.html">
in all relevant files.

How run Polymer code example?

I have downloaded this example : PolymerElements/app-layout-templates
..and I can't make it work (whereas I was able to access this one : PolymerElements/polymer-starter-kit)
I ran the following lines in the terminal :
bower init
bower -save polymer
bower bower install –save Polymer/polymer-elements Polymer/polymer-ui-elements
bower update
...and then accessed the folder via a python server.
Do you have some tips to make it work ?
If you want to try out PolymerElements/app-layout-templates then that's what you need to install on bower. Bower will download all the required dependencies for app-layout-templates to work.
bower install --save PolymerElements/app-layout-templates
After this you can start python server on folders app-layout-template, app-layout-template/nav-view etc to see how it works.
Also the repositories Polymer/polymer-elements, Polymer/polymer-ui-elements are invalid. The polymer elements are available in github repository https://github.com/PolymerElements. So to download polymer elements try something like below
bower install --save PolymerElements/iron-elements
bower install --save PolymerElements/paper-elements
bower install --save PolymerElements/neon-elements
bower install --save PolymerElements/platinum-elements

Is bower_components special or unique in some way that it isn't served up on a website?

I installed Polymer using the following commands:
bower init
bower install --save Polymer/polymer#^1.1.0
bower install --save PolymerElements/paper-elements
It created a subfolder called bower_components. But none of the files were found until I copied them to a different subfolder, and then everything started working.
Why is that?
Perhaps you want to install your bower components in the "different subfolder" by default. This can be done using the following in .bowerrc:
{
"directory": "some/directory"
}
Hope that helps.
bower_components is created when you invoke bower install. All deps in bower.json will be downloaded there.

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
#^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.
Just a difference in what gets downloaded. The former, adds an extra folder, "core-component-page". Try it yourself ;-)
The number next to the element is just a version...
If your app works with a specific version you can specified like that

error when installing polymer designer on local machine

I have cloned the git for polymer designer on my mac. Following the getting started instructions for Polymer designer works fine until I run bower install
-bash: bower: command not found
Also index.html cannot be loaded by the local httpserver.
I see this is a standard error but several solutions on stack. I need to setup this tool locally to add a custom library.
You nee to install bower: http://bower.io/#install-bower
npm install -g bower
Try this: bower install --save Polymer/polymer