Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Large project support #2656

Open rictic opened 7 years ago

rictic commented 7 years ago

Kinda a broader tracking issue here, but I'm thinking about stuff like google's internal monorepo, where converting all at once isn't possible.

One way to stagger the changes would be to produce HTML files that produce namespaces. So e.g. we could emit a polymer.html that does:

<script type="module">
  import {Element} from './polymer-element.js';
  import {Polymer} from './lib/utils/polymer-fn.js';

  window.Polymer = Polymer || {};
  window.Polymer.Element = Element;
  // the rest of the Polymer namespace
</script>

This would produce a backwards-compatible change.

We could then teach html2js to take that sort of backcompat HTML file as an input to build out our mapping of namespace members to module exports such that we could convert things one file at a time.

rictic commented 7 years ago

Marked as medium priority for now. This will become necessary.

justinfagnani commented 6 years ago

I'm marking low priority for now. We'll pop this back up when we're ready start upgrading Google.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.