Search code examples
bowerpolymer-1.0paper-elements

How to install / download complete package of Polymer elements?


I am trying to develope polymer web pages.We have to refer polymer elements from bower_components under project to use them. but i dont have files available over there.Is there any library available which has all components(eg. paper/iron etc) html files so that I can refer them into my project.?


Solution

  • The recommended way to install a component is to use bower. Bower manages dependencies for you and handles updating.

    You can read about installing components from bower, ZIP, and GitHub here.

    If you want a single ZIP with all the currently available components you can read my answer to Where to download all polymer elements as zip file?.


    There is also a project at http://element-party.xyz/ that can be used to reference the latest versions of components.

    You can import all the latest polymer elements easily into your jsbin (or otherwise) by simply doing:

    <base href="http://element-party.xyz/" />
    <script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
    <link rel="import" href="all-elements.html" />
    

    Components can be reference collectively, as shown above, or individually. Click on the Usage tab at http://element-party.xyz/ to learn more. http://element-party.xyz/ frequently updates to the bleeding edge, because of this I would not recommend using it in production.


    You can also take a look at http://polygit.org/.

    The Magic Server serves files directly from github (via cdn.rawgit.com) in a manner that is compatible with HTML Imports natural deduplication feature.

    This server concept is primarily for hit-and-run testing, jsbins, etc. The performance is less than ideal and there is very little error reporting or other niceties.

    http://polygit.org/ does have an interesting ability to specify Custom Configuration that allows for specifying specific versions of files. <component>[+<org>]+<ver>|:<branch>|*