Skip to content

Commit

Permalink
Merge pull request #28482 from storybookjs/trigger-onboarding-vue-ang…
Browse files Browse the repository at this point in the history
…ular

Addon Onboarding: Trigger onboarding during init for Vue and Angular projects
  • Loading branch information
valentinpalkovic authored Jul 8, 2024
2 parents d44f9af + ebd965c commit 8ede67f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions code/lib/cli/src/initiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,15 @@ export async function initiate(options: CommandOptions): Promise<void> {
logger.log('\nRunning Storybook');

try {
const isReactWebProject =
projectType === ProjectType.REACT_SCRIPTS ||
projectType === ProjectType.REACT ||
projectType === ProjectType.WEBPACK_REACT ||
projectType === ProjectType.REACT_PROJECT ||
projectType === ProjectType.NEXTJS;
const supportsOnboarding = [
ProjectType.REACT_SCRIPTS,
ProjectType.REACT,
ProjectType.WEBPACK_REACT,
ProjectType.REACT_PROJECT,
ProjectType.NEXTJS,
ProjectType.VUE3,
ProjectType.ANGULAR,
].includes(projectType);

const flags = [];

Expand All @@ -442,7 +445,7 @@ export async function initiate(options: CommandOptions): Promise<void> {
flags.push('--');
}

if (isReactWebProject) {
if (supportsOnboarding) {
flags.push('--initial-path=/onboarding');
}

Expand Down

0 comments on commit 8ede67f

Please sign in to comment.