Skip to content

Commit

Permalink
Add steps to link for local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
codykaup committed Nov 1, 2024
1 parent 478aa13 commit 43ef127
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,26 @@ CHROMATIC_BASE_URL=https://www.dev-chromatic.com yarn storybook

## Running against an outside Storybook

If you want to test the addon with an actual project, you can install it from npm as usual -- we publish canaries for each PR. You can also link the addon in the usual ways.
If you want to test the addon with an actual project, you can install it from NPM as usual -- we publish canaries for each PR.

You can also link the addon in the usual ways. One way via Yarn is:

```
yarn link /path/to/addon-visual-tests/repo
```

Once you do that, the project will use your local version of the addon.

When running, you can connect the addon to staging/dev similarly, although you'll need to configure the project identifier/token manually.

```bash
CHROMATIC_BASE_URL=https://www.staging-chromatic.com yarn storybook
```

## Running a local version of the Chromatic CLI

You can link a local copy of the [Chromatic CLI](https://github.com/chromaui/chromatic-cli) for testing the build workflow through the addon:

```
yarn link /path/to/chromatic-cli/repo
```

0 comments on commit 43ef127

Please sign in to comment.