Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch archive-storybook to depend on storybook instead of @storybook/cli #15

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

thafryer
Copy link
Member

@thafryer thafryer commented Jan 10, 2024

Fixes AP-3573

What Changed

We adjusted archive-storybook to depend on storybook instead of @storybook/cli.

How to test

Run the the archive-stroybook command with this package version and confirm the SB loads.

Change Type

  • maintenance
  • documentation
  • patch
  • minor
  • major
📦 Published PR as canary version: 0.0.19--canary.15.989f47c.0

✨ Test out this PR locally via:

npm install @chromaui/[email protected]
# or 
yarn add @chromaui/[email protected]

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would also need to change the require.resolve() calls:

const binPath = resolve(dirname(require.resolve('@storybook/cli/package.json')), './bin/index.js');

(and in build-archive-storybook), otherwise it'll fail in yarn pnp + pnpm in monorepos: https://www.notion.so/chromatic-ui/Peer-Dependency-Investigations-ae77792bae6e420bbe860916bec10cbe?pvs=4

Copy link
Contributor

@tevanoff tevanoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in the middle of moving this repo into the monorepo. Mind if we hold off on this and apply it to the repo, which should be ready hopefully later today?

@thafryer
Copy link
Member Author

I'm in the middle of moving this repo into the monorepo. Mind if we hold off on this and apply it to the repo, which should be ready hopefully later today?

@tevanoff I surely don't mind!

@@ -4,7 +4,7 @@ const { archivesDir } = require('../dist/filePaths');
/** @type { import('@storybook/server-webpack5').StorybookConfig } */
const config = {
stories: [path.resolve(archivesDir(), '*.stories.json')],
addons: ['@storybook/addon-essentials', '../dist'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do need this if we want to support viewport switching in the storybook. Well, maybe we only need that one addon, but does it hurt to have all of these?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants