Because the Polymer-2.0 is in preview stage, it is not in main branch. I am looking for installation procedure for Polymer-2.0 elements.
I would use bower install iron-pages to install the Polymer 1.x component. So what should I do with the 2.0 components?
You can install the 2.0-preview components:
bower install iron-pages#2.0-preview
Related
When I run polymer init, it only shows V2 templates, but I want V1. How do I install Polymer 1.x application/element templates?
There's a pending issue (polymer-cli Issue #804) to restore the 1.x templates. In the meantime, you can manually install them with:
npm i -g justinfagnani/generator-polymer-init-polymer-1-element \
justinfagnani/generator-polymer-init-polymer-1-application
This will allow the 1.x templates to be listed when running polymer init.
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
I did the following:
bower init
bower install --save Polymer/polymer#^1.1.0
But I don't see paper-button.html anywhere.
Paper elements are not included in the Polymer package. You can either install them individually or all together. The following installs the paper button.
bower install --save PolymerElements/paper-button
And this all paper elements
bower install --save PolymerElements/paper-elements
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
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