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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?

addons: ['../dist'],
framework: {
name: '@storybook/server-webpack5',
options: {},
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
"rrweb-snapshot": "^2.0.0-alpha.4"
},
"peerDependencies": {
"@storybook/addon-essentials": ">= 7.0.0",
"@storybook/cli": ">= 7.0.0",
"@storybook/server-webpack5": ">= 7.0.0"
"@storybook/server-webpack5": "^7.0.0 || ^8.0.x",
"storybook": "^7.0.0 || ^8.0.x"
},
"devDependencies": {
"@auto-it/released": "^10.32.6",
Expand All @@ -70,7 +69,6 @@
"@babel/preset-typescript": "^7.21.4",
"@jest/types": "^27.0.6",
"@storybook/addon-essentials": "^7.0.2",
"@storybook/cli": "^7.0.2",
"@storybook/eslint-config-storybook": "^3.1.2",
"@storybook/server-webpack5": "^7.0.2",
"@storybook/types": "^7.0.2",
Expand All @@ -93,6 +91,7 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"rimraf": "^3.0.2",
"storybook": "^7.0.2",
"ts-dedent": "^2.2.0",
"ts-jest": "^27.0.4",
"tsup": "^6.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/bin/archive-storybook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ checkArchivesDirExists();
const args = process.argv.slice(2);

const configDir = 'node_modules/@chromaui/archive-storybook/config';
const binPath = resolve(dirname(require.resolve('@storybook/cli/package.json')), './bin/index.js');
const binPath = resolve(dirname(require.resolve('storybook/package.json')), './index.js');
execFileSync('node', [binPath, 'dev', ...args, '-c', configDir], { stdio: 'inherit' });
2 changes: 1 addition & 1 deletion src/bin/build-archive-storybook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ checkArchivesDirExists();
const args = process.argv.slice(2);

const configDir = 'node_modules/@chromaui/archive-storybook/config';
const binPath = resolve(dirname(require.resolve('@storybook/cli/package.json')), './bin/index.js');
const binPath = resolve(dirname(require.resolve('storybook/package.json')), './index.js');
execFileSync('node', [binPath, 'build', ...args, '-c', configDir], { stdio: 'inherit' });
Loading
Loading