- Install
Polymer/polymer#2.0-preview
bower package andwebcomponents/webcomponentsjs#v1
bower package
$ bower install --save Polymer/polymer#2.0-preview
$ bower install --save webcomponents/webcomponentsjs#v1
You'll likely get resolution errors from bower because your other components in bower.json
want different version of the Polymer and webcomponents libraries.
- Remove all dependencies and extra markup in
index.html
demo file except for the component you're working on (to avoid Polymer 1.X conflicts) - Move existing
*.html
files to a1.x/
folder for reference during development - Create a new
px-[ELEMENT].es6.js
and start a base Polymer Element constructor. Copy your code from your Polymer 1.x factory into the right places.
See the note from the Polymer 2.0 upgrade guide about how to wrap.
Note that you'll need to also convert how they are called in your component's JavaScript and how they are distributed if they have names or are passed into deeper components.