Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
storybook-chromatic
Advanced tools
A CLI for uploading/connecting your storybook to chromatic/chroma.
yarn add storybook-chromatic
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
Use a debug version on npm:
npx -p storybook-chromatic chromatic
Using npx has pros and cons:
--app_code="<your app code>"
You can also use the environment variable: CHROMATIC_APP_CODE
--build-script-name [name], -b The npm script that builds your Storybook [build-storybook]
--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-build-dir, -d <dirname> Provide a directory with your built storybook; use if you've already built your storybook
--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
.
--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]
--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
--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
This package will load any variables from a .env
file if present
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!
--config
flagWe 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 is guaranteed between this package and chromatic like so:
To facilitate upgrading in the future, removing and adding features, this is the process:
FAQs
Visual Testing for Storybook
The npm package storybook-chromatic receives a total of 4,834 weekly downloads. As such, storybook-chromatic popularity was classified as popular.
We found that storybook-chromatic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.