capo.js
capo.js copied to clipboard
Manage code duplication
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.
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