Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli): declarative build configuration #2633

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Commits on Oct 23, 2024

  1. refactor(cli): add and use getThemesFor(dimensions) in build command

    This automates the config filtering which so far has been done manually, e.g. this
    ```ts
    const semanticThemes = R.filter((val) => val.mode === 'light' && val.typography === 'primary', themes)
    ```
    
    is now this
    ```
    const semanticThemes = getThemesFor('semantic');
    ```
    
    The main reason for doing this is that it requires no changes to the filters when adding new modes, while the code as it is before this commit would require every `R.filter(...)` statement to be updated to ignore irrelevant modes -- or suffer exponential increase in build time.
    
    The resulting css files from the build command remain unchanged.
    unekinn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    81c56a8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    36bc6a0 View commit details
    Browse the repository at this point in the history
  3. pr changes

    unekinn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    72ffccd View commit details
    Browse the repository at this point in the history
  4. further cleanup

    unekinn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    2792ebd View commit details
    Browse the repository at this point in the history