capo.js icon indicating copy to clipboard operation
capo.js copied to clipboard

Manage code duplication

Open rviscomi opened this issue 2 years ago • 1 comments

The core capo logic is effectively duplicated across the snippet, WPT custom metric, BQ function, and now the Chrome extension.

Devise a way to have all of the core logic defined in one place and integrated into each surface. This will probably require a build process.

rviscomi avatar Jun 19 '23 15:06 rviscomi

Made progress in #45 using ESM to break up the capo logic into reusable scripts for both the snippet and extension.

TODO for this issue:

  • [ ] generate WPT script from reusable scripts
  • [ ] generate BigQuery SQL from reusable scripts

rviscomi avatar Jul 10 '23 01:07 rviscomi