Skip to content

Commit

Permalink
Merge pull request #103 from happo/storybook-7-additional-check
Browse files Browse the repository at this point in the history
Improve checking for Storybook v7
  • Loading branch information
trotzig authored Dec 22, 2023
2 parents 16dbaad + 948618f commit d10affa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ function resolveBuildCommandParts() {
console.log('[happo] Check for Storybook v6 failed. Details:', e);
}
}
try {
execSync(`${binary} storybook --version`);
// Storybook v7 or later
return ['storybook', 'build'];
} catch (e) {
if (HAPPO_DEBUG) {
console.log(
'[happo] Check for Storybook v7 failed. Details:',
e,
);
}
}
try {
execSync(`${binary} build-storybook --version`);
return ['build-storybook'];
Expand Down

0 comments on commit d10affa

Please sign in to comment.