I choose the display-rss component because it’s simple and has most of the use cases you would find in a web component.
What the component does basically loads any RSS feed and displays it
We’ll begin by stalling Yeoman:
npm install -g yo
Then we’ll install the Polymer Generator
npm install -g generator-polymer
Then create a new folder
mkdir my-element && cd $_
And start the generator
Once all dependencies are downloaded we can create our element using:
yo polymer:element my-element
This command will ask us if we want to include a constructor, we mark the check, and we also mark that we want to import to our index.html using HTML imports.
Then it will ask if we want to import local elements, we leave blank.
Then it will ask if we want to import installed Bower elements, we are going to write
polymer-json since we’ll be using it later.
Finally this will create our element in
Since we said we wanted the
polymer-jsonp element we have to install it:
bower install --save Polymer/polymer-jsonp
--save option ensure that this gets added to your bower.json file, if you are asked to choose a suitable version for polymer, I usually choose the one that specifies a version number.