Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to upgrade a Polymer 1.0 project to Polymer 3.0

We have a huge Polymer 1.0 project with a few hundred elements and are wondering whats the best way to upgrade everything to 3.0. Should we upgrade to 2.0 first or directly go to 3.0? Also are there any good guides available as the Polymer documentation on this does not seem to be very good. Also there were tools promised for automatic upgrading but they are nowhere to be found, does anyone know about this?

like image 397
EFM Avatar asked Aug 22 '18 11:08

EFM


1 Answers

there is polymer-modulizer to convert from Polymer 2.x to 3 directly But as you are using polymer 1 then the conversion result will need a human review for sure.

One thing to mention that polymer 2 already supports the legacy elements style from polymer-1, so there is a chance that polymer-modulizer will be able to update the syntax to polymer 3 for polymer 1 elements too, but I have not tried that

Long story short, there is only one tool which is polymer-modulizer to convert Polymer 2.x to 3 and the tool will automate some repetitive tasks for you, but still, you need to fix some stuff manually, if polymer-modulizerfails to upgrade the project for you to the new syntax, then it is better to start thinking about refactoring to support polymer 3 manually

The official documentation about upgrading to polymer 3 can be found here

like image 197
Hyyan Abo Fakher Avatar answered Oct 01 '22 12:10

Hyyan Abo Fakher