11.18.1 • Published 4 days ago

chromatic v11.18.1

Weekly downloads
170,708
License
MIT
Repository
github
Last release
4 days ago

Storybook Chromatic & Storybook Chroma

A CLI to connect your Storybook with Chromatic or Chroma.

Install

yarn add storybook-chromatic

Usage

You can use this package normally, which means installing it and adding a script called chromatic to your package.json

  "chromatic": "chromatic",

But alternatively (and this is useful for testing) you can use npx:

Use a git branch:

npx -p chromaui/chromatic-cli#master chromatic --dev

Use a debug version on npm:

npx -p storybook-chromatic chromatic

Using npx has pros and cons:

  • 👍 You'll never be out of date, you'll use the latest version every time, never have to worry about upgrading this.
  • 👍 You don't need this package as a dependency, and don't need to install it during local development
  • 👎 This will add a delay when you actually do want to run this, like in your CI, delaying feedback.

Usage in a github action

There are examples here: /.github/workflows.

Do not run this based on a github pull_request event. If you do, the commit and branch will get reported wrong, use https://github.com/chromaui/action instead.

Main options

--project-token="<your token>"

You can also use the environment variable: CHROMATIC_PROJECT_TOKEN

Storybook options

--build-script-name [name], -b  The npm script that builds your Storybook [build-storybook]
--storybook-build-dir, -d <dirname>  Provide a directory with your built storybook; use if you've already built your storybook

Deprecated options (for tunneled builds):

--script-name [name], -s  The npm script that starts your Storybook [storybook]
--exec <command>, -e  Alternatively, a full command to run to start your storybook
--do-not-start, -S  Don't attempt to start or build; use if your Storybook is already running

--storybook-port <port>, -p  What port is your Storybook running on (auto detected from -s, if set)
--storybook-url <url>, -u  Storybook is already running at (external) url (implies -S)'
--storybook-https  Use if Storybook is running on https (auto detected from -s, if set)
--storybook-cert <path>  Use if Storybook is running on https (auto detected from -s, if set)
--storybook-key <path>  Use if Storybook is running on https (auto detected from -s, if set)
--storybook-ca <ca>  Use if Storybook is running on https (auto detected from -s, if set)    

These options are not required, this CLI is 0-config if you have a build-storybook script in your package.json.

Chromatic options

--allow-console-errors  Continue running chromatic even if some stories throw an error
--auto-accept-changes [branch]  Accept any (non-error) changes or new stories for this build [only for <branch> if specified]'
--exit-zero-on-changes [branch]  Use a 0 exit code if changes are detected (i.e. don't stop the build) [only for <branch> if specified]
--exit-once-uploaded [branch]  Exit with 0 once the built version has been sent to chromatic [only for <branch> if specified]
--ignore-last-build-on-branch [branch]  Do not use the last build on this branch as a baseline if it is no longer in history (i.e. branch was rebased) [only for <branch> if specified]'
--preserve-missing  Treat missing stories as unchanged (as opposed to deleted) when comparing to the baseline'
--no-interactive  Do not prompt for package.json changes
--only <component:story>  Only run a single story or a glob-style subset of stories (for debugging purposes

Debug options

--skip  Skip chromatic tests (mark as passing)
--list  List available stories (for debugging purposes)
--ci  This build is running on CI, non-interactively (alternatively, pass CI=true)
--debug  Output more debugging information

Environment variables

This package will load any variables from a .env file if present

Issues

If you encounter issues with the CLI please report them via the in-app chat (Intercom widget) or at https://github.com/chromaui/chromatic-cli/issues. Thanks!

Contributing

Because of the nature of this package: it being a connector between Storybook and a web service, you may need an app code to test this locally. Just send us a message at opensource@hichroma.com or sign up for an account!

All contributions are welcome!

Future plans:

  • We'd like to unify this so there's just a single package on npm.
  • Migrate to Typescript
  • Deprecate all the Storybook options in favor of a sane --config flag

Publishing

We publish with a script:

./scripts/publish.js

You can pass any flags to this you'd normally be able to pass to npm publish, such as --dry-run or --tag="alpha".

Before publishing we check if the current user has permissions and if the version isn't already on npm

Compatibility & versioning

Compatibility is guaranteed between this package and Chromatic like so:

  • Production Chromatic ensures it’s compatible with what’s on NPM
  • What's on the master branch is equal to what's published on NPM
  • This package ensures it’s compatible with production Chromatic

To facilitate upgrading in the future, removing and adding features, this is the process:

  • Any new features will have to be on Chromatic production before they could be used in this package
  • We can feature flags to be able to test new functionality
  • Chromatic production can not remove any features this package depends on until after the usage has been removed from this package. Plus a grace period so users have upgraded
gha-componentsbolttech-componentsshared-react-native-types@everything-registry/sub-chunk-1323publish-storybookdesign-system-with-storybookoutsystems-stenciloutsystems-ui-stencilroadrunner.uiframeworkstorybook-addon-fakersx-configwl-chromatic-adoanci-reactmkcp-solarpunklluvia-learnstorybook-design-systemiss-va-web-componentsmolekulehs-component-libju-libraryjason-kang-uinavrary-layoutmakyoluna_chartspshh-components-libraryposchh-components-librarypixi-sveltereact-chain-uistencil-library-ddssociogram-storiestuple-uiui-kit-befluentut-storybook@aherrahul/design-system@chromaui/addon-visual-tests@chromatic-com/storybook@codingdud/coolicons@codelikeagirlau/clg-storybook-next@department-of-veterans-affairs/web-components@hexagonpro/hx-components@infinitebrahmanuniverse/nolb-chro@liquidcloud/liquid-component@liveart/injectables@laura.broder/learnstorybook-design-system-template@lendi-ui/accordion@lendi/ui@lendi-ui/field@neon.id/cli@evoltis/sigura3-common-ui@jojomatik/nuxt-bundle@jstjoshin/storybook-design-system@hxtos/hx-components@rib-hub/ui@storybook-addon-faker/addon@openfun/cunningham-react@pokt-foundation/pocket-dashboard-frontend@pingux/astro@organisme/cli@styled-x/config@styledx/config@sysvale/cuida@shawnsandy/fp-react@ska-it/ska-it-design-system@cristianps1988/ds-template@daleseo/ui@cpchain-foundation/hooks@calyptia-vivo/components@react-chain-ui/rootakv-capsizeaiq-design-systemalfabit-dsalfabit-ds-willyalfabit-july-dsandrew22k-bip-design-system@workleap/chromado@workleap/chromatic-ado@top-message/ui-libchoi-learnstorybook-design-systemchatbot-ui-libclusterenvision-ui-controlsclusterenvision-ui-reactdesignsystem-alfabitdemio-uidraupnir-dsdraftemui0draftemui00draftemui000dolorautembigbets-dsapollo-spreadsheetbutterfly-components
11.18.1

10 days ago

11.17.0

15 days ago

11.16.4

18 days ago

11.16.5

18 days ago

11.18.0

15 days ago

11.16.2

24 days ago

11.16.3

23 days ago

11.16.0

28 days ago

11.16.1

28 days ago

11.15.0

1 month ago

11.14.0

1 month ago

11.13.0

1 month ago

11.12.6

1 month ago

11.11.0

2 months ago

11.12.0

2 months ago

11.12.2

1 month ago

11.12.1

1 month ago

11.12.4

1 month ago

11.12.3

1 month ago

11.12.5

1 month ago

11.9.0

2 months ago

11.10.2

2 months ago

11.10.1

2 months ago

11.10.4

2 months ago

11.10.3

2 months ago

11.10.0

2 months ago

11.8.0

2 months ago

11.7.1

3 months ago

11.7.0

4 months ago

11.6.0

4 months ago

11.4.0

6 months ago

11.4.1

6 months ago

11.5.1

6 months ago

11.5.2

6 months ago

11.5.0

6 months ago

11.5.5

5 months ago

11.5.6

4 months ago

11.5.3

6 months ago

11.5.4

5 months ago

11.3.3

6 months ago

11.3.4

6 months ago

11.3.2

7 months ago

11.3.5

6 months ago

11.3.1

7 months ago

11.3.0

8 months ago

11.2.0

8 months ago

11.1.1

8 months ago

11.1.0

8 months ago

11.0.8

9 months ago

11.0.7

9 months ago

11.0.6

9 months ago

11.0.5

9 months ago

11.0.4

9 months ago

11.0.2

9 months ago

11.0.3

9 months ago

11.0.1

9 months ago

11.0.0

9 months ago

10.9.6

9 months ago

10.9.5

9 months ago

10.9.4

9 months ago

10.9.2

10 months ago

10.9.3

10 months ago

10.9.1

10 months ago

10.8.0

10 months ago

10.9.0

10 months ago

10.7.0

10 months ago

10.7.1

10 months ago

10.6.0

10 months ago

10.6.1

10 months ago

10.5.1

10 months ago

10.5.2

10 months ago

10.4.0

10 months ago

10.5.0

10 months ago

10.3.1

10 months ago

10.3.0

10 months ago

10.2.2

10 months ago

10.2.1

11 months ago

10.2.0

11 months ago

10.1.0

12 months ago

10.0.0

12 months ago

6.20.0-canary.1

1 year ago

6.20.0-canary.0

1 year ago

7.2.0-next.1

1 year ago

6.24.0-canary.0

1 year ago

7.3.0-next.2

1 year ago

7.3.0-next.0

1 year ago

7.3.0-next.1

1 year ago

6.23.0-next.0

1 year ago

7.2.0-canary.0

1 year ago

7.2.0-canary.1

1 year ago

6.20.0

1 year ago

6.22.0-canary.3

1 year ago

6.22.0-canary.4

1 year ago

6.22.0-canary.5

1 year ago

6.22.0-canary.0

1 year ago

6.22.0-canary.1

1 year ago

6.22.0-canary.2

1 year ago

7.3.0

1 year ago

7.1.0-next.1

1 year ago

7.1.0-next.0

1 year ago

7.4.0

1 year ago

7.5.3

1 year ago

7.5.2

1 year ago

7.5.1

1 year ago

7.5.0

1 year ago

7.5.4

1 year ago

9.0.0

1 year ago

7.6.0

1 year ago

9.1.0

1 year ago

7.1.0-canary.3

1 year ago

7.1.0-canary.4

1 year ago

7.1.0-canary.1

1 year ago

7.1.0-canary.2

1 year ago

6.24.1-next.0

1 year ago

6.24.1-next.1

1 year ago

6.24.0

1 year ago

6.23.0-canary.0

1 year ago

6.24.1

1 year ago

7.0.0-canary.0

1 year ago

6.25.0-canary.0

1 year ago

7.0.0-next.0

1 year ago

6.23.0

1 year ago

6.23.1

1 year ago

7.2.1-canary.0

1 year ago

7.0.0

1 year ago

6.20.1-canary.0

1 year ago

6.22.0

1 year ago

7.1.0

1 year ago

7.2.3

1 year ago

6.21.0

1 year ago

7.2.2

1 year ago

7.2.1

1 year ago

7.2.0

1 year ago

8.0.0

1 year ago

6.19.3-next.0

1 year ago

6.19.4-canary.0

1 year ago

6.19.8-canary.1

1 year ago

6.19.8-canary.2

1 year ago

6.19.8-next.1

1 year ago

6.19.8-next.2

1 year ago

6.19.6-canary.0

1 year ago

6.19.2-canary.0

1 year ago

6.19.3-canary.1

1 year ago

6.19.8

1 year ago

6.19.9

1 year ago

6.19.6

1 year ago

6.19.7

1 year ago

6.19.0

1 year ago

6.19.1

1 year ago

6.19.4

1 year ago

6.19.5

1 year ago

6.19.2

1 year ago

6.19.3

1 year ago

6.17.5-canary.0

2 years ago

6.18.1

1 year ago

6.18.2

1 year ago

6.18.0

1 year ago

6.19.0-canary.0

1 year ago

6.19.0-canary.1

1 year ago

6.19.0-canary.2

1 year ago

6.19.0-canary.3

1 year ago

6.17.4

2 years ago

6.17.4-next.1

2 years ago

6.17.3

2 years ago

6.17.4-next.0

2 years ago

6.17.3-canary.6

2 years ago

6.17.3-canary.5

2 years ago

6.17.3-canary.4

2 years ago

6.17.3-canary.8

2 years ago

6.17.3-canary.2

2 years ago

6.17.3-canary.1

2 years ago

6.17.3-canary.0

2 years ago

6.17.3-canary.12

2 years ago

6.17.3-canary.11

2 years ago

6.17.3-canary.10

2 years ago

6.18.0-canary.1

2 years ago

6.18.0-canary.0

2 years ago

6.17.2

2 years ago

6.17.3-next.0

2 years ago

6.17.1

2 years ago

6.17.0

2 years ago

6.16.0-next.0

2 years ago

6.16.0-canary.2

2 years ago

6.16.0-canary.3

2 years ago

6.16.0-canary.4

2 years ago

6.15.0-canary.0

2 years ago

6.12.0-next.0

2 years ago

6.14.0-next.0

2 years ago

6.15.0

2 years ago

6.14.0

2 years ago

6.12.0-canary.0

2 years ago

6.13.1

2 years ago

6.13.0

2 years ago

6.12.0

2 years ago

6.14.0-canary.0

2 years ago

6.11.2-next.0

2 years ago

6.10.2-next.2

2 years ago

6.10.2-next.1

2 years ago

6.11.1

2 years ago

6.11.0

2 years ago

6.11.4

2 years ago

6.11.3

2 years ago

6.11.2

2 years ago

6.10.2

2 years ago

6.10.5

2 years ago

6.10.4

2 years ago

6.10.3

2 years ago

6.10.2-canary.16

2 years ago

6.10.2-canary.15

2 years ago

6.10.2-canary.14

2 years ago

6.10.2-canary.13

2 years ago

6.10.2-canary.12

2 years ago

6.10.2-canary.11

2 years ago

6.10.2-canary.10

2 years ago

6.10.2-canary.3

2 years ago

6.10.2-canary.2

2 years ago

6.10.2-canary.1

2 years ago

6.10.2-canary.9

2 years ago

6.10.2-canary.8

2 years ago

6.10.2-canary.7

2 years ago

6.10.2-canary.6

2 years ago

6.10.2-canary.5

2 years ago

6.10.2-canary.4

2 years ago

6.10.2-next.0

2 years ago

6.10.1

2 years ago

6.10.0

2 years ago

6.6.1-next.0

2 years ago

6.6.2-canary.0

2 years ago

6.6.1

2 years ago

6.6.3

2 years ago

6.6.2

2 years ago

6.6.4

2 years ago

6.7.0

2 years ago

6.7.2

2 years ago

6.6.0-canary.7

2 years ago

6.7.1

2 years ago

6.7.4

2 years ago

6.7.3

2 years ago

6.6.1-canary.0

2 years ago

6.8.1

2 years ago

6.8.0

2 years ago

6.6.4-canary.0

2 years ago

6.6.4-next.0

2 years ago

6.9.0

2 years ago

6.6.3-canary.0

2 years ago

6.6.0-canary.6

2 years ago

6.6.0-canary.3

2 years ago

6.5.6-canary.0

2 years ago

6.6.0-next.5

2 years ago

6.6.0-next.4

2 years ago

6.6.0-next.3

2 years ago

6.6.0-next.2

2 years ago

6.6.0-next.1

3 years ago

6.6.0-next.0

3 years ago

6.5.6

2 years ago

6.5.5

2 years ago

6.5.5-canary.5

2 years ago

6.5.5-canary.3

2 years ago

6.5.5-canary.4

2 years ago

6.5.5-canary.2

2 years ago

6.6.0-alpha.1

3 years ago

6.6.0-alpha.2

3 years ago

6.6.0-alpha.0

3 years ago

6.6.0-canary.1

3 years ago

6.6.0-canary.0

3 years ago

6.5.2

3 years ago

6.5.4

3 years ago

6.5.3

3 years ago

6.5.2-canary.0

3 years ago

6.1.0

3 years ago

6.5.0

3 years ago

6.4.0-canary.2

3 years ago

6.4.0-canary.1

3 years ago

6.4.0-canary.0

3 years ago

6.4.3-canary.0

3 years ago

6.2.1

3 years ago

6.2.0

3 years ago

6.2.3

3 years ago

6.2.2

3 years ago

6.3.4

3 years ago

6.3.3

3 years ago

6.3.0-canary.1

3 years ago

6.3.0-canary.0

3 years ago

6.3.0

3 years ago

6.3.2

3 years ago

6.3.1

3 years ago

6.4.3

3 years ago

6.4.2

3 years ago

6.4.2-canary.1

3 years ago

6.4.2-canary.2

3 years ago

6.2.0-canary.0

3 years ago

6.4.2-canary.0

3 years ago

6.4.1

3 years ago

6.4.0

3 years ago

6.5.1

3 years ago

6.3.3-canary.0

3 years ago

6.3.3-canary.1

3 years ago

6.4.1-canary.0

3 years ago

6.0.6

3 years ago

6.0.5-canary.0

3 years ago

6.0.5

3 years ago

6.0.3

3 years ago

6.0.2

3 years ago

6.0.4

3 years ago

6.0.2-canary.5

3 years ago

6.0.2-canary.0

3 years ago

6.0.2-canary.4

3 years ago

6.0.2-canary.3

3 years ago

6.0.2-canary.2

3 years ago

6.0.2-canary.1

3 years ago

6.0.0

3 years ago

5.10.2

3 years ago

6.0.0-canary.13

3 years ago

6.0.0-canary.11

3 years ago

6.0.0-canary.10

3 years ago

6.0.0-canary.12

3 years ago

6.0.0-canary.1

3 years ago

6.0.0-canary.2

3 years ago

6.0.0-canary.9

3 years ago

6.0.0-canary.8

3 years ago

6.0.0-canary.5

3 years ago

6.0.0-canary.6

3 years ago

6.0.0-canary.3

3 years ago

6.0.0-canary.4

3 years ago

5.10.1

3 years ago

6.0.0-canary.0

3 years ago

5.10.0

3 years ago

5.10.0-canary.4

3 years ago

5.10.0-canary.3

3 years ago

5.10.0-next.0

3 years ago

5.10.0-canary.1

3 years ago

5.10.0-canary.2

3 years ago

5.10.0-canary.0

3 years ago

5.9.2

3 years ago

5.9.1

3 years ago

5.9.0

3 years ago

5.7.2-canary.8

4 years ago

5.7.2-canary.7

4 years ago

5.7.2-canary.9

4 years ago

5.7.2-canary.6

4 years ago

5.8.0-debug.0

4 years ago

5.8.0-debug.1

4 years ago

5.8.0-debug.2

4 years ago

5.8.3

4 years ago

5.8.2

4 years ago

5.8.1

4 years ago

5.8.0

4 years ago

5.9.0-next.0

4 years ago

5.7.2-canary.10

4 years ago

5.7.2-canary.11

4 years ago

5.7.2-canary.5

4 years ago

5.7.2-canary.4

4 years ago

5.7.2-canary.0

4 years ago

5.7.2-canary.2

4 years ago

5.7.2-canary.1

4 years ago

5.7.2-canary.3

4 years ago

5.7.1-canary.0

4 years ago

5.7.1

4 years ago

5.8.0-canary.0

4 years ago

5.7.0

4 years ago

5.6.3

4 years ago

5.6.2

4 years ago

5.6.1

4 years ago

5.6.1-rc.0

4 years ago

5.6.0

4 years ago

5.5.1-dev.1

4 years ago

5.5.1-dev.0

4 years ago

5.6.0-alpha.0

4 years ago

5.5.0

4 years ago

5.5.0-dev.0

4 years ago

5.4.0

4 years ago

5.3.0

4 years ago

5.3.0-alpha.0

4 years ago

5.3.0-alpha.1

4 years ago

5.2.0

4 years ago

5.2.0-beta.0

4 years ago

5.1.0

4 years ago

5.1.0-alpha.2

4 years ago

5.1.0-alpha.3

4 years ago

5.1.0-alpha.4

4 years ago

5.1.0-alpha.1

4 years ago

5.1.0-alpha.0

4 years ago

5.0.0

4 years ago

5.0.0-beta.8

4 years ago

5.0.0-beta.7

4 years ago

5.0.0-beta.6

4 years ago

5.0.0-beta.5

4 years ago

5.0.0-beta.4

4 years ago

5.0.0-beta.2

4 years ago

5.0.0-beta.3

4 years ago

5.0.0-beta.1

4 years ago

5.0.0-beta.0

4 years ago

5.0.0-alpha.4

4 years ago

5.0.0-alpha.3

4 years ago

5.0.0-alpha.2

4 years ago

5.0.0-alpha.1

4 years ago

5.0.0-alpha.0

4 years ago

4.0.3

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

4.0.2

5 years ago

4.0.0-alpha.2

5 years ago

4.0.0-alpha.1

5 years ago

4.0.0-alpha.0

5 years ago

0.1.0

9 years ago