![]() ![]() All other snapshots will be inherited from the prior commit. Globs are supported via picomatch.Įnables TurboSnap: Only run stories affected by files and dependencies changed since the baseline build. Requires -only-changed.ĭo not use the last build on this branch as a baseline if it is no longer in history (i.e., the branch was rebased). This flag can be specified multiple times. Globs are supported via picomatch.ĭisable TurboSnap when any of these files have changed since the baseline build. If all snapshots render, but there are visual changes, exit with code 0 rather than the usual exit code 1. This option implies -no-interactive.Įxit with 0 once the built version has been published to Chromatic. Alternatively, set the CI environment variable (present in most CI systems). Only meant to be used for unsupported CI integrations and fixing cross-fork PR comparisons. If there are any changes to the build, automatically accept them. These might be needed in certain branching situations. These options control how Chromatic behaves concerning your stories and what to do with them. An optional flag value is interpreted as true when no value is provided. Alias: -dĪ placeholder in denotes a required value, while denotes an optional value. If you have already built your Storybook, provide the path to the static build directory. Otherwise, a temporary directory is used if possible. Relative path to target directory for building your Storybook, in case you want to preserve it. Use this if your Storybook build script is named differently. The npm script that builds your Storybook we should take snapshots against. Otherwise, you might specify one of these. Storybook options Ĭhromatic is zero-config if you have a build-storybook script in your package.json. Store your project token as the CHROMATIC_PROJECT_TOKEN environment variable or secret. Get your project token from the Chromatic website during onboarding or on your project’s Manage page. The only required configuration is the project token. □ It will be slower to run because the package has to be downloaded first.□ You won’t need to install the package during local development if you’re only running it in continuous integration.□ You’ll never be out of date, you’ll use the latest version every time, never have to worry about upgrading Chromatic. ![]() If you don’t install chromatic as a dependency, npx will automatically download and run the latest version. Optionally, you can install chromatic as a dependency while using the same script above. If you customize the way your Storybook runs, you may need to pass additional options.Īfter the first run, the CLI will automatically ask you to add a script to your package.json. Quick Start npx chromatic -project-token See migrating to the new package for details. This package was previously named storybook-chromatic.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |