When reading the code for the first time, I recommend starting at lib/upgrade_html.js and then flow through into lib/upgrade_js.js and expand out from there.
By far the easiest way to contribute to polyup
is to file bugs. For most issues, the most helpful bug reports will answer the questions:
- What input did you provide?
- What output did you see?
- What output did you expect?
This is a good simple template to file your bugs with.
polyup
won't get everything right. There are tons of ways to write HTML and
Javascript – some of them terribly clever – and polyup
is just aiming for the
sweet spot of upgrading fairly simple and straightforward code. The advantage
of this tradeoff is that it's simpler and more capable.
✓ polyup deleted my comments!
✓ polyup doesn't handle a <template repeat> inside of a <template if> correctly.
✓ polyup didn't move the attributes for this code into the published block.
✗ polyup changed my code's whitespace and quote mark style.
Sorry! polyup works at the abstract syntax tree level, and some
information is lost in translation!
✗ polyup doesn't upgrade my Polymer element factory generator.
polyup isn't a full static analysis system, it only looks at the
rough shape of your source code and doesn't track values across
references or other similarly complex bookkeeping