Step 1 from T349423:
Implement basic support for codexComponents in the CodexModule class: load the specified components and add them to the collector module; but without support for CSS-only or dependencies (there's a proof of concept sketch of this in this patch)
- Preserve the existing CodexModule code (which is specific to the codex-styles and codex-search-styles modules) for now; but plan to remove it later
- Add code that:
- Determines which manifest file to use (LTR, RTL, legacy LTR or legacy RTL) based on the context
- Determines which files to load from Codex, based on the codexComponents key in the module definition and the contents of the manifest file
- Adds those files to the module object's packageFiles and styles properties
- Adds a virtual codex-subset.js file that gets the requested components from the Codex files and exports them
- Run that code when getPackageFiles, getStyleFiles or getDefinitionSummary are called, before calling the parent's implementation of those methods
This should not affect any existing code, as long as the existing code in CodexModule (used by the style modules) is preserved.