chromaui / addon-visual-tests

Visual Tests addon for Storybook
MIT License
36 stars 2 forks source link

POC - use zod + cosmiconfig to parse configuration #74

Closed tmeasday closed 1 year ago

tmeasday commented 1 year ago
📦 Published PR as canary version: 0.0.54--canary.74.3cbd34c.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/addon-visual-tests@0.0.54--canary.74.3cbd34c.0 # or yarn add @chromaui/addon-visual-tests@0.0.54--canary.74.3cbd34c.0 ```
linear[bot] commented 1 year ago
AP-3623 Add CLI support for a chromatic.js config file that allows multiple environments and configuration outside of .storybook/

Currently users must configure their chromatic cli inside of storybook configuration and through cli flags. This may be confusing as users might require different settings for local builds vs ci builds. We may be able to improve this by allowing users to define their configurations in a separate, type-safe config file. This should be an additional form of configuration, and allow backwards compatibility for existing setups using cli flags and ci configuration. It may need to allow both approaches to be mixed. **Multiple Environments:** With the addon-visual-tests having more users run builds outside of CI, configuration for the cli may need to vary based on the environment. Supporting multiple environments, through environment-suffixed names or programatic configuration would help optimize configuration for local builds. Related Slack thread: [https://chromaticqa.slack.com/archives/C051TQR6QLC/p1693198584200749](https://chromaticqa.slack.com/archives/C051TQR6QLC/p1693198584200749)

tmeasday commented 1 year ago

Closing in favour of https://github.com/chromaui/chromatic-cli/pull/814