Polymer: Basic installation

There is a detailed guide on how to install Polymer in  Installing Polymer.

Here I am making a very simple guide without details. If you need more information go to the official site.

To prepare the ambient you will need:

  • Bower – To resolve dependencies and download packages
  • NodeJS and npm – Bower requirement
  • Git –  Bower requirement

Instal NodeJs and npm

Go to the NodeJS and npm project website, download and install.

Install Git

Go to the git project website, download and install.

Install Bower

To install bower, just open a command prompt and run the command

Create a new project for polymer

Now that all tools are installed, you can create a new project and download Polymer components.

Create a new folder and use it to host the project. For example, create a folder named polsample in c:

Now initialize project setup in bower

And provide info for the questions. After finished a new file named bower.json will be created at c:\polsample\.

Install Polymer:

Bower adds a folder named bower_components in the polsample folder (c:\polsample\bower_components) and adds a new dependency inside you bower.json. At the end your config will be something like this:

If you need to update dependencies, run:

Install polymer component

When you need to use a component from Polymer you just need to install it using Bower. For example, if we create a project and want to use the component paper-button, you must run the command

And later in your project add the desired link for the component:

The information about component names you can find in the polymer project website. For papper-button it is at  paper-button

Thats it. In another article I will discuss about creating a custom component.